neuralmonkey.encoders.pooling module¶
-
class
neuralmonkey.encoders.pooling.SequenceAveragePooling(name: str, input_sequence: neuralmonkey.model.stateful.TemporalStateful, save_checkpoint: str = None, load_checkpoint: str = None, initializers: List[Tuple[str, Callable]] = None) → None¶ Bases:
neuralmonkey.encoders.pooling.SequencePoolingAn average pooling layer over a sequence.
Averages a sequence over time to produce a single state.
-
output¶ Return the object output.
A 2D Tensor of shape (batch, state_size) which contains the resulting state of the object.
-
-
class
neuralmonkey.encoders.pooling.SequenceMaxPooling(name: str, input_sequence: neuralmonkey.model.stateful.TemporalStateful, save_checkpoint: str = None, load_checkpoint: str = None, initializers: List[Tuple[str, Callable]] = None) → None¶ Bases:
neuralmonkey.encoders.pooling.SequencePoolingA max pooling layer over a sequence.
Takes the maximum of a sequence over time to produce a single state.
-
output¶ Return the object output.
A 2D Tensor of shape (batch, state_size) which contains the resulting state of the object.
-
-
class
neuralmonkey.encoders.pooling.SequencePooling(name: str, input_sequence: neuralmonkey.model.stateful.TemporalStateful, save_checkpoint: str = None, load_checkpoint: str = None, initializers: List[Tuple[str, Callable]] = None) → None¶ Bases:
neuralmonkey.model.model_part.ModelPart,neuralmonkey.model.stateful.StatefulAn abstract pooling layer over a sequence.
-
__init__(name: str, input_sequence: neuralmonkey.model.stateful.TemporalStateful, save_checkpoint: str = None, load_checkpoint: str = None, initializers: List[Tuple[str, Callable]] = None) → None¶ Initialize an instance of the pooling layer.
-
get_dependencies() → Set[neuralmonkey.model.model_part.ModelPart]¶ Collect recusively all encoders and decoders.
-