One Logo Pool Ball
MetalPerformanceShaders · IOS API REFERENCE

MPSNNForwardLoss

class · iOS 13.0+ · SDK 27.1

class MPSNNForwardLoss

Members (16)

method · iOS 13.0+

encodeBatch

TypeScript
encodeBatchCommandBufferSourceImagesLabelsWeightsDestinationStatesDestinationImages(commandBuffer: SDKHandle, sourceImages: Array<MPSImage>, labels: Array<MPSImage>, weights: (Array<MPSImage>) | null, destinationStates: (Array<MPSState>) | null, destinationImages: Array<MPSImage>): void
Swift declaration
func encodeBatch(commandBuffer: any MTLCommandBuffer, sourceImages: [MPSImage], labels: [MPSImage], weights: [MPSImage]?, destinationStates: [MPSState]?, destinationImages: [MPSImage])
method · iOS 13.0+

encodeBatch

TypeScript
encodeBatchCommandBufferSourceImagesLabelsWeightsOutStatesIsTemporary(commandBuffer: SDKHandle, sourceImages: Array<MPSImage>, labels: Array<MPSImage>, weights: (Array<MPSImage>) | null, isTemporary: boolean): { $ret: Array<MPSImage>; $out: { "outStates": (_Foundation_NSArray) | null } }
Swift declaration
func encodeBatch(commandBuffer: any MTLCommandBuffer, sourceImages: [MPSImage], labels: [MPSImage], weights: [MPSImage]?, outStates: AutoreleasingUnsafeMutablePointer<NSArray?>?, isTemporary: Bool) -> [MPSImage]

Omit the output parameters from the call. The result contains $ret and $out, with outStates inside $out.

init · iOS 13.0+

init

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

init

TypeScript
static initDeviceLossDescriptor(device: SDKHandle, lossDescriptor: MPSCNNLossDescriptor): MPSNNForwardLoss
Swift declaration
init(device: any MTLDevice, lossDescriptor: MPSCNNLossDescriptor)
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.

MPSNNForwardLoss.init()

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

All MetalPerformanceShaders types →