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

A reshape layer.

  • The target shape.

    Declaration

    public let shape: Tensor<Int32>
  • Creates a reshape layer.

    Declaration

    public init(shape: Tensor<Int32>)

    Parameters

    shape

    The target shape, represented by a tensor.

  • Creates a reshape layer.

    Declaration

    public init(_ shape: TensorShape)

    Parameters

    shape

    The target shape.

  • Returns the output obtained from applying the layer to the given input.

    Declaration

    public func call(_ input: Tensor<Scalar>) -> Tensor<Scalar>

    Parameters

    input

    The input to the layer.

    Return Value

    The output.