Here's from a framework we are using. It barfs at the @available on the enum.
@available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, *)
extension BNNS {
public enum ActivationFunction {
case identity
case rectifiedLinear
case leakyRectifiedLinear(alpha: Swift.Float)
case sigmoid
case logSigmoid
case tanh
case scaledTanh(alpha: Swift.Float, beta: Swift.Float)
case abs
case linear(alpha: Swift.Float)
case clamp(bounds: Swift.ClosedRange<Swift.Float>)
case softmax
case geluApproximation(alpha: Swift.Float, beta: Swift.Float)
case geluApproximation2(alpha: Swift.Float, beta: Swift.Float)
case gumbel(alpha: Swift.Float, beta: Swift.Float)
case gumbelMax(alpha: Swift.Float, beta: Swift.Float)
case hardSigmoid(alpha: Swift.Float, beta: Swift.Float)
case softplus(alpha: Swift.Float, beta: Swift.Float)
case softsign
case elu(alpha: Swift.Float)
case selu
case celu(alpha: Swift.Float)
case clampedLeakyRectifiedLinear(alpha: Swift.Float, beta: Swift.Float)
case linearWithBias(alpha: Swift.Float, beta: Swift.Float)
case logSoftmax
case hardShrink(alpha: Swift.Float)
case softShrink(alpha: Swift.Float)
case tanhShrink
case threshold(alpha: Swift.Float, beta: Swift.Float)
@available(macOS 12.0, iOS 15.0, tvOS 15.0, watchOS 8.0, *)
case hardSwish(alpha: Swift.Float, beta: Swift.Float)
@available(macOS 12.0, iOS 15.0, tvOS 15.0, watchOS 8.0, *)
case silu
public var bnnsActivation: Accelerate.BNNSActivation {
get
}
}