One Logo Pool Ball
MetalPerformanceShaders · IOS API REFERENCE

MPSRNNMatrixTrainingLayer

class · iOS 12.0+ · SDK 27.1

class MPSRNNMatrixTrainingLayer

Members (21)

method · iOS 12.0+

copy

TypeScript
copy(device?: (SDKHandle) | null): MPSRNNMatrixTrainingLayer
Swift declaration
func copy(with zone: NSZone? = nil, device: (any MTLDevice)?) -> Self
method · iOS 12.0+

createTemporaryWeightGradientMatrices

TypeScript
createTemporaryWeightGradientMatrices(matricesOut: _Foundation_NSMutableArray, dataType: MPSDataType, commandBuffer: SDKHandle): void
Swift declaration
func createTemporaryWeightGradientMatrices(_ matricesOut: NSMutableArray, dataType: MPSDataType, commandBuffer: any MTLCommandBuffer)
method · iOS 12.0+

createWeightGradientMatrices

TypeScript
createWeightGradientMatrices(matricesOut: _Foundation_NSMutableArray, dataType: MPSDataType): void
Swift declaration
func createWeightGradientMatrices(_ matricesOut: NSMutableArray, dataType: MPSDataType)
method · iOS 12.0+

createWeightMatrices

TypeScript
createWeightMatrices(matricesOut: _Foundation_NSMutableArray): void
Swift declaration
func createWeightMatrices(_ matricesOut: NSMutableArray)
method · iOS 12.0+

encodeCopyWeights

TypeScript
encodeCopyWeights(commandBuffer: SDKHandle, weights: Array<MPSMatrix>, matrixId: MPSRNNMatrixId, matrix: MPSMatrix, copyFromWeightsToMatrix: boolean, matrixOffset: _Metal_MTLOrigin): void
Swift declaration
func encodeCopyWeights(commandBuffer: any MTLCommandBuffer, weights: [MPSMatrix], matrixId: MPSRNNMatrixId, matrix: MPSMatrix, copyFromWeightsToMatrix: Bool, matrixOffset: MTLOrigin)
method · iOS 12.0+

encodeForwardSequence

TypeScript
encodeForwardSequenceCommandBufferSourceMatricesDestinationMatricesTrainingStatesWeights(commandBuffer: SDKHandle, sourceMatrices: Array<MPSMatrix>, destinationMatrices: Array<MPSMatrix>, trainingStates: _Foundation_NSMutableArray, weights: Array<MPSMatrix>): void
Swift declaration
func encodeForwardSequence(commandBuffer: any MTLCommandBuffer, sourceMatrices: [MPSMatrix], destinationMatrices: [MPSMatrix], trainingStates: NSMutableArray, weights: [MPSMatrix])
method · iOS 12.0+

encodeForwardSequence

TypeScript
encodeForwardSequenceCommandBufferSourceMatricesSourceOffsetsDestinationMatricesDestinationOffsetsTrainingStatesRecurrentInputStateRecurrentOutputStatesWeights(commandBuffer: SDKHandle, sourceMatrices: Array<MPSMatrix>, sourceOffsets: (SDKHandle) | null, destinationMatrices: Array<MPSMatrix>, destinationOffsets: (SDKHandle) | null, trainingStates: _Foundation_NSMutableArray, recurrentInputState: (MPSRNNRecurrentMatrixState) | null, recurrentOutputStates: (_Foundation_NSMutableArray) | null, weights: Array<MPSMatrix>): void
Swift declaration
func encodeForwardSequence(commandBuffer: any MTLCommandBuffer, sourceMatrices: [MPSMatrix], sourceOffsets: UnsafeMutablePointer<Int>?, destinationMatrices: [MPSMatrix], destinationOffsets: UnsafeMutablePointer<Int>?, trainingStates: NSMutableArray, recurrentInputState: MPSRNNRecurrentMatrixState?, recurrentOutputStates: NSMutableArray?, weights: [MPSMatrix])
method · iOS 12.0+

encodeGradientSequence

TypeScript
encodeGradientSequenceCommandBufferForwardSourcesForwardSourceOffsetsSourceGradientsSourceOffsetsDestinationGradientsDestinationOffsetsWeightGradientsTrainingStatesRecurrentInputStateRecurrentOutputStatesWeights(commandBuffer: SDKHandle, forwardSources: Array<MPSMatrix>, forwardSourceOffsets: (SDKHandle) | null, sourceGradients: Array<MPSMatrix>, sourceGradientOffsets: (SDKHandle) | null, destinationGradients: (Array<MPSMatrix>) | null, destinationOffsets: (SDKHandle) | null, weightGradients: (Array<MPSMatrix>) | null, trainingStates: Array<MPSRNNMatrixTrainingState>, recurrentInputState: (MPSRNNRecurrentMatrixState) | null, recurrentOutputStates: (_Foundation_NSMutableArray) | null, weights: Array<MPSMatrix>): void
Swift declaration
func encodeGradientSequence(commandBuffer: any MTLCommandBuffer, forwardSources: [MPSMatrix], forwardSourceOffsets: UnsafeMutablePointer<Int>?, sourceGradients: [MPSMatrix], sourceOffsets sourceGradientOffsets: UnsafeMutablePointer<Int>?, destinationGradients: [MPSMatrix]?, destinationOffsets: UnsafeMutablePointer<Int>?, weightGradients: [MPSMatrix]?, trainingStates: [MPSRNNMatrixTrainingState], recurrentInputState: MPSRNNRecurrentMatrixState?, recurrentOutputStates: NSMutableArray?, weights: [MPSMatrix])
method · iOS 12.0+

encodeGradientSequence

TypeScript
encodeGradientSequenceCommandBufferForwardSourcesSourceGradientsDestinationGradientsWeightGradientsTrainingStatesWeights(commandBuffer: SDKHandle, forwardSources: Array<MPSMatrix>, sourceGradients: Array<MPSMatrix>, destinationGradients: (Array<MPSMatrix>) | null, weightGradients: (Array<MPSMatrix>) | null, trainingStates: Array<MPSRNNMatrixTrainingState>, weights: Array<MPSMatrix>): void
Swift declaration
func encodeGradientSequence(commandBuffer: any MTLCommandBuffer, forwardSources: [MPSMatrix], sourceGradients: [MPSMatrix], destinationGradients: [MPSMatrix]?, weightGradients: [MPSMatrix]?, trainingStates: [MPSRNNMatrixTrainingState], weights: [MPSMatrix])
init · iOS 11.0+

init

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

init

TypeScript
static initDeviceRnnDescriptorTrainableWeights(device: SDKHandle, rnnDescriptor: MPSRNNDescriptor, trainableWeights: _Foundation_NSMutableArray): MPSRNNMatrixTrainingLayer
Swift declaration
init(device: any MTLDevice, rnnDescriptor: MPSRNNDescriptor, trainableWeights: NSMutableArray)
get · iOS 12.0+

accumulateWeightGradients

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

accumulateWeightGradients

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

inputFeatureChannels

TypeScript
get inputFeatureChannels(): number
Swift declaration
var inputFeatureChannels: Int { get }
get · iOS 12.0+

outputFeatureChannels

TypeScript
get outputFeatureChannels(): number
Swift declaration
var outputFeatureChannels: Int { get }
get · iOS 12.0+

recurrentOutputIsTemporary

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

recurrentOutputIsTemporary

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

storeAllIntermediateStates

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

storeAllIntermediateStates

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

trainingStateIsTemporary

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

trainingStateIsTemporary

TypeScript
set trainingStateIsTemporary(value: boolean)
Swift declaration
var trainingStateIsTemporary: Bool { get set }

Skipped declarations

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

MPSRNNMatrixTrainingLayer.init()

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

All MetalPerformanceShaders types →