LayerType

public protocol LayerType

Undocumented

  • Inputs of the layer

    Declaration

    Swift

    associatedtype Inputs
  • Outputs of the layer

    Declaration

    Swift

    associatedtype Outputs
  • Element type of a parameter tensor

    Declaration

    Swift

    associatedtype Parameter : NumericType
  • Device type of a parameter tensor

    Declaration

    Swift

    associatedtype Device : DeviceType
  • Keypaths to parameters that influence the output of the layer

    Declaration

    Swift

    var parameterPaths: [WritableKeyPath<Self, Tensor<Parameter, Device>>] { get }
  • Parameters, that influence the output of the layer.

    Declaration

    Swift

    var parameters: [Tensor<Parameter, Device>] { get }
  • Performs a transformation determined by the type of the layer.

    The transformation may use parameters that the layer has.

    Declaration

    Swift

    func callAsFunction(_ inputs: Inputs) -> Outputs

    Parameters

    inputs

    Inputs of the layer

    Return Value

    Outputs generated by transforming the inputs using the parameters of the layer.