Flatten
neuralpy.layers.other.Faltten(start_dim=1, end_dim=-1, name=None)
info
Flatten is mostly stable and can be used for any project. In the future, any chance of breaking changes is very low.
Flattens a contiguous range of dims into a tensor. For use with Sequential.
For more information, check this page
Supported Arguments
start_dim=1
: (Integer) First dim to flattenend_dim=-1
: (Integer) Last dim to flattenname=None
: (String) Name of the layer, if not provided then automatically calculates a unique name for the layer
Example Code
from neuralpy.models import Sequential
from neuralpy.layers.other import Flatten
# Initializing the Sequential models
model = Sequential()
...
...
...
model.add(Flatten(start_dim=1, end_dim=-1, name="Flatten layer"))