Flatten

object Flatten : LayerSingleInput<Flatten>

Flattens the input. Does not affect batch size.

Shape transform: (N, *) -> (N, )

Functions

cpu
Link copied to clipboard
open override fun cpu(): Layer<Flatten>
getSingleInput
Link copied to clipboard
open fun getSingleInput(inputs: Array<out DTensor>): DTensor

Helper to check that the layer was called with a single input. Returns that input if successful, else errors.

gpu
Link copied to clipboard
open override fun gpu(): Layer<Flatten>
invoke
Link copied to clipboard
open operator override fun invoke(input: DTensor): DTensor
open operator override fun invoke(vararg inputs: DTensor): DTensor
to
Link copied to clipboard
open fun to(device: Device): OnDevice