One Logo Pool Ball
MetalPerformanceShaders · IOS API REFERENCE

MPSNNLossGradient

class · iOS 13.0+ · SDK 27.1

class MPSNNLossGradient

Members (18)

method · iOS 13.0+

encodeBatch

TypeScript
encodeBatchCommandBufferSourceGradientsSourceImagesLabelsWeightsSourceStates(commandBuffer: SDKHandle, sourceGradients: Array<MPSImage>, sourceImages: Array<MPSImage>, labels: Array<MPSImage>, weights?: (Array<MPSImage>) | null, sourceStates?: (Array<MPSState>) | null): Array<MPSImage>
Swift declaration
func encodeBatch(commandBuffer: any MTLCommandBuffer, sourceGradients: [MPSImage], sourceImages: [MPSImage], labels: [MPSImage], weights: [MPSImage]?, sourceStates: [MPSState]?) -> [MPSImage]
method · iOS 13.0+

encodeBatch

TypeScript
encodeBatchCommandBufferSourceGradientsSourceImagesLabelsWeightsSourceStatesDestinationGradients(commandBuffer: SDKHandle, sourceGradients: Array<MPSImage>, sourceImages: Array<MPSImage>, labels: Array<MPSImage>, weights: (Array<MPSImage>) | null, sourceStates: (Array<MPSState>) | null, destinationGradients: Array<MPSImage>): void
Swift declaration
func encodeBatch(commandBuffer: any MTLCommandBuffer, sourceGradients: [MPSImage], sourceImages: [MPSImage], labels: [MPSImage], weights: [MPSImage]?, sourceStates: [MPSState]?, destinationGradients: [MPSImage])
init · iOS 13.0+

init

TypeScript
static initCoderDevice(aDecoder: _Foundation_NSCoder, device: SDKHandle): (MPSNNLossGradient) | null
Swift declaration
init?(coder aDecoder: NSCoder, device: any MTLDevice)
init · iOS 13.0+

init

TypeScript
static initDeviceLossDescriptor(device: SDKHandle, lossDescriptor: MPSCNNLossDescriptor): MPSNNLossGradient
Swift declaration
init(device: any MTLDevice, lossDescriptor: MPSCNNLossDescriptor)
get · iOS 13.0+

computeLabelGradients

TypeScript
get computeLabelGradients(): boolean
Swift declaration
var computeLabelGradients: Bool { get set }
set · iOS 13.0+

computeLabelGradients

TypeScript
set computeLabelGradients(value: boolean)
Swift declaration
var computeLabelGradients: Bool { get set }
get · iOS 13.0+

delta

TypeScript
get delta(): number
Swift declaration
var delta: Float { get set }
set · iOS 13.0+

delta

TypeScript
set delta(value: number)
Swift declaration
var delta: Float { get set }
get · iOS 13.0+

epsilon

TypeScript
get epsilon(): number
Swift declaration
var epsilon: Float { get set }
set · iOS 13.0+

epsilon

TypeScript
set epsilon(value: number)
Swift declaration
var epsilon: Float { get set }
get · iOS 13.0+

labelSmoothing

TypeScript
get labelSmoothing(): number
Swift declaration
var labelSmoothing: Float { get set }
set · iOS 13.0+

labelSmoothing

TypeScript
set labelSmoothing(value: number)
Swift declaration
var labelSmoothing: Float { get set }
get · iOS 13.0+

lossType

TypeScript
get lossType(): MPSCNNLossType
Swift declaration
var lossType: MPSCNNLossType { get }
get · iOS 13.0+

numberOfClasses

TypeScript
get numberOfClasses(): number
Swift declaration
var numberOfClasses: Int { get }
get · iOS 14.0+

reduceAcrossBatch

TypeScript
get reduceAcrossBatch(): boolean
Swift declaration
var reduceAcrossBatch: Bool { get }
get · iOS 13.0+

reductionType

TypeScript
get reductionType(): MPSCNNReductionType
Swift declaration
var reductionType: MPSCNNReductionType { get }
get · iOS 13.0+

weight

TypeScript
get weight(): number
Swift declaration
var weight: Float { get set }
set · iOS 13.0+

weight

TypeScript
set weight(value: number)
Swift declaration
var weight: Float { get set }

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

MPSNNLossGradient.init()

inherited init: cannot prove legal (class declares 1 custom initializer)

All MetalPerformanceShaders types →