Flatten

@frozen
public struct Flatten<Scalar> : ParameterlessLayer where Scalar : TensorFlowFloatingPoint

A flatten layer.

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

  • Declaration

    public typealias TangentVector = EmptyTangentVector
  • Creates a flatten layer.

    Declaration

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

    Declaration

    @differentiable
    public func forward(_ input: Tensor<Scalar>) -> Tensor<Scalar>

    Parameters

    input

    The input to the layer.

    Return Value

    The output.