Flow related layers¶
Those layers don’t perform any computation in the forward pass.
-
class
dynn.layers.flow_layers.
Flatten
¶ Bases:
dynn.layers.base_layers.BaseLayer
Flattens the output such that there is only one dimension left (batch dimension notwithstanding)
Example:
# Create the layer flatten = Flatten() # Dummy batched 2d input x = dy.zeros((3, 4), batch_size=7) # x.dim() -> (3, 4), 7 y = flatten(x) # y.dim() -> (12,), 7
-
__call__
(x)¶ Flattens the output such that there is only one dimension left (batch dimension notwithstanding)
Parameters: x ([type]) – [description] Returns: [description] Return type: [type]
-
__init__
()¶ Initialize self. See help(type(self)) for accurate signature.
-