MPSCNNLossLabels(3) | MetalPerformanceShaders.framework | MPSCNNLossLabels(3) |
MPSCNNLossLabels
#import <MPSCNNLoss.h>
Inherits MPSState.
(nonnull instancetype) - init
(nonnull instancetype) - initWithDevice:labelsDescriptor:
(nonnull instancetype) -
initWithDevice:lossImageSize:labelsDescriptor:weightsDescriptor:
(nonnull MPSImage *) - lossImage
(nonnull MPSImage *) - labelsImage
(nonnull MPSImage *) - weightsImage
This depends on Metal.framework. The MPSCNNLossLabels is used to hold the per-element weights buffer used by both MPSCNNLoss forward filter and MPSCNNLossGradient backward filter. The MPSCNNLoss forward filter populates the MPSCNNLossLabels object and the MPSCNNLossGradient backward filter consumes the state object.
Use one of the interfaces below instead.
Reimplemented from MPSState.
Set labels (aka targets, ground truth) for the MPSCNNLossLabels object. The labels and weights data are copied into internal storage. The computed loss can either be a scalar value (in batch mode, a single value per image in a batch) or it can be one value per feature channel. Thus, the size of the loss image must either match the size of the input source image or be {1, 1, 1}, which results in a scalar value. In this convinience initializer, the assumed size of the loss image is {1, 1, 1}.
Parameters:
Set labels (aka targets, ground truth) and weights for the MPSCNNLossLabels object. Weights are optional. The labels and weights data are copied into internal storage.
Parameters:
weightsDescriptor Describes the weights data. This includes:
Labels image accessor method.
Returns:
In order to gaurantee that the image is correctly synchronized for CPU side access, it is the application's responsibility to call the [gradientState synchronizeOnCommandBuffer:] method before accessing the data in the image.
Loss image accessor method.
Returns:
In order to gaurantee that the image is correctly synchronized for CPU side access, it is the application's responsibility to call the [gradientState synchronizeOnCommandBuffer:] method before accessing the data in the image.
Weights image accessor method.
Returns:
In order to gaurantee that the image is correctly synchronized for CPU side access, it is the application's responsibility to call the [gradientState synchronizeOnCommandBuffer:] method before accessing the data in the image.
Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code.
Mon Jul 9 2018 | Version MetalPerformanceShaders-119.3 |