Flatten

public struct Flatten<Element, Device> : LayerType, Codable where Element : NumericType, Device : DeviceType

Layer that flattens its inputs into a tensor of shape [batchSize, -1]

  • Declaration

    Swift

    public var parameterPaths: [WritableKeyPath<`Self`, Tensor<Element, Device>>] { get }
  • Declaration

    Swift

    public var parameters: [Tensor<Element, Device>] { get }
  • Layer that flattens its inputs into a tensor of shape [batchSize, -1]

    Declaration

    Swift

    public init()
  • Declaration

    Swift

    public func callAsFunction(_ inputs: Tensor<Element, Device>) -> Tensor<Element, Device>