public interface MPSNNLossCallback extends NSSecureCoding, NSCopying
MPSNNLossCallback Defines a callback protocol for @ref MPSNNForwardLossNode and @ref MPSNNLossGradientNode to set the scalar weight value just before encoding the underlying kernels.
| Modifier and Type | Method and Description |
|---|---|
float |
scalarWeightForSourceImageDestinationImage(MPSImage sourceImage,
MPSImage destinationImage)
Returns the desired loss scaling weight value.
|
_supportsSecureCodingencodeWithCoder, initWithCodercopyWithZonefloat scalarWeightForSourceImageDestinationImage(MPSImage sourceImage, MPSImage destinationImage)
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.