SoftmaxCrossEntropyLoss
public struct SoftmaxCrossEntropyLoss : Loss
Softmax cross-entropy loss. This combines softmax with cross-entropy loss to maximize numerical stability.
-
Declaration
Swift
public var trim0: Float
-
Declaration
Swift
public var trim1: Float
-
Declaration
Swift
public init(trim0: Float = 0, trim1: 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