AnyLayer
public struct AnyLayer<Inputs, Outputs, Parameter, Device> : LayerType where Parameter : NumericType, Device : DeviceType
Type erased layer
-
Declaration
Swift
public var parameterPaths: [WritableKeyPath<`Self`, Tensor<Parameter, Device>>] { get }
-
Declaration
Swift
public var parameters: [Tensor<Parameter, Device>] { get set }
-
Creates a layer by type-erasing the given layer
Declaration
Swift
public init<L>(_ wrappedLayer: L) where Inputs == L.Inputs, Outputs == L.Outputs, Parameter == L.Parameter, Device == L.Device, L : LayerType
Parameters
wrappedLayer
Layer to wrap.
-
Declaration
Swift
public func callAsFunction(_ inputs: Inputs) -> Outputs