MPSCNNYOLOLoss(3) MetalPerformanceShaders.framework MPSCNNYOLOLoss(3)

MPSCNNYOLOLoss

#import <MPSCNNLoss.h>

Inherits MPSCNNKernel.


(nonnull instancetype) - initWithDevice:
(nonnull instancetype) - initWithDevice:lossDescriptor:
(nullable instancetype) - initWithCoder:device:
(void) - encodeToCommandBuffer:sourceImage:labels:destinationImage:
(MPSImage *__nonnull) - encodeToCommandBuffer:sourceImage:labels:
(void) - encodeBatchToCommandBuffer:sourceImages:labels:destinationImages:
(MPSImageBatch *__nonnull) - encodeBatchToCommandBuffer:sourceImages:labels:


MPSCNNLoss * lossXY
MPSCNNLoss * lossWH
MPSCNNLoss * lossConfidence
MPSCNNLoss * lossClasses
float scaleXY
float scaleWH
float scaleNoObject
float scaleObject
float scaleClass
float minIOUForObjectPresence
float maxIOUForObjectAbsence
MPSCNNReductionType reductionType
NSUInteger numberOfAnchorBoxes
NSData * anchorBoxes

- (MPSImageBatch*__nonnull) encodeBatchToCommandBuffer: (nonnull id< MTLCommandBuffer >) commandBuffer(MPSImageBatch *__nonnull) sourceImage(MPSCNNLossLabelsBatch *__nonnull) labels

- (void) encodeBatchToCommandBuffer: (nonnull id< MTLCommandBuffer >) commandBuffer(MPSImageBatch *__nonnull) sourceImage(MPSCNNLossLabelsBatch *__nonnull) labels(MPSImageBatch *__nonnull) destinationImage

- (MPSImage*__nonnull) encodeToCommandBuffer: (nonnull id< MTLCommandBuffer >) commandBuffer(MPSImage *__nonnull) sourceImage(MPSCNNLossLabels *__nonnull) labels

Encode a MPSCNNLoss filter and return a gradient. This -encode call is similar to the encodeToCommandBuffer:sourceImage:labels:destinationImage: above, except that it creates and returns the MPSImage with the loss gradient result.

Parameters:

commandBuffer The MTLCommandBuffer on which to encode.
sourceImage The source image from the previous filter in the graph (in the inference direction).
labels The object containing the target data (labels) and optionally, weights for the labels.

Returns:

The MPSImage containing the gradient result.

- (void) encodeToCommandBuffer: (nonnull id< MTLCommandBuffer >) commandBuffer(MPSImage *__nonnull) sourceImage(MPSCNNLossLabels *__nonnull) labels(MPSImage *__nonnull) destinationImage

Encode a MPSCNNYOLOLoss filter and return a gradient in the destinationImage. This filter consumes the output of a previous layer and the MPSCNNLossLabels object containing the target data (labels) and optionally, weights for the labels. The destinationImage contains the computed gradient for the loss layer. It serves as a source gradient input image to the first gradient layer (in the backward direction). For information on the data-layout see MPSCNNYOLOLossDescriptor.

Parameters:

commandBuffer The MTLCommandBuffer on which to encode.
sourceImage The source image from the previous filter in the graph (in the inference direction).
labels The object containing the target data (labels) and optionally, weights for the labels.
destinationImage The MPSImage into which to write the gradient result.

- (nullable instancetype) initWithCoder: (NSCoder *__nonnull) aDecoder(nonnull id< MTLDevice >) device

<NSSecureCoding> support

Reimplemented from MPSCNNKernel.

- (nonnull instancetype) initWithDevice: (nonnull id< MTLDevice >) device

Standard init with default properties per filter type

Parameters:

device The device that the filter will be used on. May not be NULL.

Returns:

A pointer to the newly initialized object. This will fail, returning nil if the device is not supported. Devices must be MTLFeatureSet_iOS_GPUFamily2_v1 or later.

Reimplemented from MPSCNNKernel.

- (nonnull instancetype) initWithDevice: (nonnull id< MTLDevice >) device(MPSCNNYOLOLossDescriptor *_Nonnull) lossDescriptor

Initialize the loss filter with a loss descriptor.

Parameters:

device The device the filter will run on.
lossDescriptor The loss descriptor.

Returns:

A valid MPSCNNLoss object or nil, if failure.

- (NSData*) anchorBoxes [read], [nonatomic], [retain]

- lossClasses [read], [nonatomic], [retain]

loss filter for prediction of bounding box predicted class of the detected object

- lossConfidence [read], [nonatomic], [retain]

loss filter for prediction of bounding box probability of presence of object

- lossWH [read], [nonatomic], [retain]

loss filter for prediction of bounding box size

- lossXY [read], [nonatomic], [retain]

loss filter for prediction of bounding box position

- (float) maxIOUForObjectAbsence [read], [nonatomic], [assign]

- (float) minIOUForObjectPresence [read], [nonatomic], [assign]

- (NSUInteger) numberOfAnchorBoxes [read], [nonatomic], [assign]

- (MPSCNNReductionType) reductionType [read], [nonatomic], [assign]

- (float) scaleClass [read], [nonatomic], [assign]

- (float) scaleNoObject [read], [nonatomic], [assign]

- (float) scaleObject [read], [nonatomic], [assign]

- (float) scaleWH [read], [nonatomic], [assign]

- (float) scaleXY [read], [nonatomic], [assign]

See MPSCNNYOLOLossDescriptor for information about the following properties.

Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code.

Mon Jul 9 2018 Version MetalPerformanceShaders-119.3