MetalPerformanceShaders · IOS API REFERENCE
MPSNNForwardLoss
class · iOS 13.0+ · SDK 27.1
class MPSNNForwardLoss
Members (16)
method · iOS 13.0+encodeBatch
TypeScriptencodeBatchCommandBufferSourceImagesLabelsWeightsDestinationStatesDestinationImages(commandBuffer: SDKHandle, sourceImages: Array<MPSImage>, labels: Array<MPSImage>, weights: (Array<MPSImage>) | null, destinationStates: (Array<MPSState>) | null, destinationImages: Array<MPSImage>): void
Swift declarationfunc encodeBatch(commandBuffer: any MTLCommandBuffer, sourceImages: [MPSImage], labels: [MPSImage], weights: [MPSImage]?, destinationStates: [MPSState]?, destinationImages: [MPSImage])
method · iOS 13.0+encodeBatch
TypeScriptencodeBatchCommandBufferSourceImagesLabelsWeightsOutStatesIsTemporary(commandBuffer: SDKHandle, sourceImages: Array<MPSImage>, labels: Array<MPSImage>, weights: (Array<MPSImage>) | null, isTemporary: boolean): { $ret: Array<MPSImage>; $out: { "outStates": (_Foundation_NSArray) | null } }
Swift declarationfunc 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
TypeScriptstatic initCoderDevice(aDecoder: _Foundation_NSCoder, device: SDKHandle): (MPSNNForwardLoss) | null
Swift declarationinit?(coder aDecoder: NSCoder, device: any MTLDevice)
init · iOS 13.0+init
TypeScriptstatic initDeviceLossDescriptor(device: SDKHandle, lossDescriptor: MPSCNNLossDescriptor): MPSNNForwardLoss
Swift declarationinit(device: any MTLDevice, lossDescriptor: MPSCNNLossDescriptor)
get · iOS 13.0+delta
TypeScriptget delta(): number
Swift declarationvar delta: Float { get set }
set · iOS 13.0+delta
TypeScriptset delta(value: number)
Swift declarationvar delta: Float { get set }
get · iOS 13.0+epsilon
TypeScriptget epsilon(): number
Swift declarationvar epsilon: Float { get set }
set · iOS 13.0+epsilon
TypeScriptset epsilon(value: number)
Swift declarationvar epsilon: Float { get set }
get · iOS 13.0+labelSmoothing
TypeScriptget labelSmoothing(): number
Swift declarationvar labelSmoothing: Float { get set }
set · iOS 13.0+labelSmoothing
TypeScriptset labelSmoothing(value: number)
Swift declarationvar labelSmoothing: Float { get set }
get · iOS 13.0+lossType
TypeScriptget lossType(): MPSCNNLossType
Swift declarationvar lossType: MPSCNNLossType { get }
get · iOS 13.0+numberOfClasses
TypeScriptget numberOfClasses(): number
Swift declarationvar numberOfClasses: Int { get }
get · iOS 14.0+reduceAcrossBatch
TypeScriptget reduceAcrossBatch(): boolean
Swift declarationvar reduceAcrossBatch: Bool { get }
get · iOS 13.0+reductionType
TypeScriptget reductionType(): MPSCNNReductionType
Swift declarationvar reductionType: MPSCNNReductionType { get }
get · iOS 13.0+weight
TypeScriptget weight(): number
Swift declarationvar weight: Float { get set }
set · iOS 13.0+weight
TypeScriptset weight(value: number)
Swift declarationvar 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 →