flatten - flatten layer classes

The file yann.layers.flatten.py contains the definition for the flatten layers.

class yann.layers.flatten.flatten_layer(input, input_shape, id=-1, verbose=2)[source]

This is a flatten layer. This takes a square layer and flatten it.

Parameters:
  • input – output of some layer.
  • id – id of the layer
  • verbose – as usual
class yann.layers.flatten.unflatten_layer(input, shape, input_shape, id=-1, verbose=2)[source]

This is an unflatten layer. This takes a flattened input and unflattens it.

Parameters:
  • input – output of some layer.
  • shape – shape to unflatten.
  • id – id of the layer
  • verbose – as usual.