proc init[T](ctx: Context[Tensor[T]]; layerType: typedesc[Flatten[T]];
inShape: seq[int]): Flatten[T]
Creates a flattening layer, which "flattens" its input by reshaping it into a one-dimensional tensor. inShape describes the expected shape of the input.
Source
Edit