Interface MPSNNLossCallback
-
- All Superinterfaces:
NSCoding,NSCopying,NSSecureCoding
public interface MPSNNLossCallback extends NSSecureCoding, NSCopying
[@protocol] MPSNNLossCallback MPSNNLossCallback Defines a callback protocol for @ref MPSNNForwardLossNode and @ref MPSNNLossGradientNode to set the scalar weight value just before encoding the underlying kernels.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description floatscalarWeightForSourceImageDestinationImage(MPSImage sourceImage, MPSImage destinationImage)Returns the desired loss scaling weight value.-
Methods inherited from interface apple.foundation.protocol.NSCoding
encodeWithCoder, initWithCoder
-
Methods inherited from interface apple.foundation.protocol.NSCopying
copyWithZone
-
Methods inherited from interface apple.foundation.protocol.NSSecureCoding
_supportsSecureCoding
-
-
-
-
Method Detail
-
scalarWeightForSourceImageDestinationImage
float scalarWeightForSourceImageDestinationImage(MPSImage sourceImage, MPSImage destinationImage)
Returns the desired loss scaling weight value.- Parameters:
sourceImage- One of the source images in the batch given as a reference.destinationImage- One of the destination images in the batch given as a reference.- Returns:
- The desired scalar weight value.
-
-