DyNN
latest

Contents:

  • DyNN
    • dynn package
      • DyNN
      • Subpackages
        • dynn.data package
        • dynn.layers package
      • Submodules
DyNN
  • Docs »
  • DyNN »
  • dynn package »
  • dynn.layers package »
  • Flow related layers
  • Edit on GitHub

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.

Next Previous

© Copyright 2018, Paul Michel Revision 7e780c4d.

Built with Sphinx using a theme provided by Read the Docs.