Swish

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

Element-wise Swish activation layer.

  • Declaration

    Swift

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

    Swift

    public var parameters: [Tensor<Element, Device>] { get }
  • Undocumented

    Declaration

    Swift

    public var beta: Tensor<Element, Device>
  • Element-wise Swish activation layer with learnable beta parameter

    Declaration

    Swift

    public init(trainableWithChannels channels: Int)
  • Element-wise Swish activation layer with fixed beta parameter

    Declaration

    Swift

    public init(fixedWithBeta beta: Element = 1)
  • Declaration

    Swift

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