SigmoidBinaryCrossEntropyLoss
public struct SigmoidBinaryCrossEntropyLoss : Loss
Sigmoid cross-entropy loss. This combines sigmoid with binary cross-entropy loss to maximize numerical stability.
-
Declaration
Swift
public var posWeight: Float
-
Declaration
Swift
public init(posWeight: Float = 1)
-
Declaration
Swift
public func callAsFunction<T: DynamicGraph.AnyTensorGroup, U: DynamicGraph.AnyTensorGroup>( _ input: T, target: U, streamContext: StreamContext? ) -> [T.AnyTensor] where T.AnyTensor == U.AnyTensor