Function

public struct Function<Input, Output> : ParameterlessLayer where Input : Differentiable, Output : Differentiable

A layer that encloses a custom differentiable function.

  • Declaration

    public typealias Body = @differentiable (Input) -> Output
  • Declaration

    @noDerivative
    public let body: Body
  • Declaration

    public init(_ body: @escaping Body)
  • Declaration

    @differentiable
    public func callAsFunction(_ input: Input) -> Output