public struct Flatten<Scalar> : Layer where Scalar : TensorFlowFloatingPoint

A flatten layer.

A flatten layer flattens the input when applied without affecting the batch size.

  • Creates a flatten layer.

    Declaration

    public init()
  • Returns the output obtained from applying the layer to the given input.

    Declaration

    public func applied(to input: Tensor<Scalar>, in _: Context) -> Tensor<Scalar>

    Parameters

    input

    The input to the layer.

    context

    The contextual information for the layer application, e.g. the current learning phase.

    Return Value

    The output.