One Logo Pool Ball
MetalPerformanceShadersGraph · IOS API REFERENCE

MPSGraph

class · iOS 14.0+ · SDK 27.1

class MPSGraph

Members (388)

static · iOS 14.0+

new

TypeScript
static new(): MPSGraph
Swift declaration
class func new() -> Self
method · iOS 16.0+

GRUGradients

TypeScript
GRUGradientsRecurrentWeightSourceGradientZStateOutputFwdInputWeightBiasDescriptorName(source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, sourceGradient: MPSGraphTensor, zState: MPSGraphTensor, outputFwd: MPSGraphTensor, inputWeight: (MPSGraphTensor) | null, bias: (MPSGraphTensor) | null, descriptor: MPSGraphGRUDescriptor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func GRUGradients(_ source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, sourceGradient: MPSGraphTensor, zState: MPSGraphTensor, outputFwd: MPSGraphTensor, inputWeight: MPSGraphTensor?, bias: MPSGraphTensor?, descriptor: MPSGraphGRUDescriptor, name: String?) -> [MPSGraphTensor]
method · iOS 16.0+

GRUGradients

TypeScript
GRUGradientsRecurrentWeightSourceGradientZStateOutputFwdInputWeightBiasInitStateDescriptorName(source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, sourceGradient: MPSGraphTensor, zState: MPSGraphTensor, outputFwd: MPSGraphTensor, inputWeight: (MPSGraphTensor) | null, bias: (MPSGraphTensor) | null, initState: (MPSGraphTensor) | null, descriptor: MPSGraphGRUDescriptor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func GRUGradients(_ source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, sourceGradient: MPSGraphTensor, zState: MPSGraphTensor, outputFwd: MPSGraphTensor, inputWeight: MPSGraphTensor?, bias: MPSGraphTensor?, initState: MPSGraphTensor?, descriptor: MPSGraphGRUDescriptor, name: String?) -> [MPSGraphTensor]
method · iOS 16.0+

GRUGradients

TypeScript
GRUGradientsRecurrentWeightSourceGradientZStateOutputFwdStateGradientInputWeightBiasInitStateMaskSecondaryBiasDescriptorName(source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, sourceGradient: MPSGraphTensor, zState: MPSGraphTensor, outputFwd: MPSGraphTensor, stateGradient: (MPSGraphTensor) | null, inputWeight: (MPSGraphTensor) | null, bias: (MPSGraphTensor) | null, initState: (MPSGraphTensor) | null, mask: (MPSGraphTensor) | null, secondaryBias: (MPSGraphTensor) | null, descriptor: MPSGraphGRUDescriptor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func GRUGradients(_ source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, sourceGradient: MPSGraphTensor, zState: MPSGraphTensor, outputFwd: MPSGraphTensor, stateGradient: MPSGraphTensor?, inputWeight: MPSGraphTensor?, bias: MPSGraphTensor?, initState: MPSGraphTensor?, mask: MPSGraphTensor?, secondaryBias: MPSGraphTensor?, descriptor: MPSGraphGRUDescriptor, name: String?) -> [MPSGraphTensor]
method · iOS 16.0+

GRU

TypeScript
GRURecurrentWeightInputWeightBiasDescriptorName(source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, inputWeight: (MPSGraphTensor) | null, bias: (MPSGraphTensor) | null, descriptor: MPSGraphGRUDescriptor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func GRU(_ source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, inputWeight: MPSGraphTensor?, bias: MPSGraphTensor?, descriptor: MPSGraphGRUDescriptor, name: String?) -> [MPSGraphTensor]
method · iOS 16.0+

GRU

TypeScript
GRURecurrentWeightInputWeightBiasInitStateDescriptorName(source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, inputWeight: (MPSGraphTensor) | null, bias: (MPSGraphTensor) | null, initState: (MPSGraphTensor) | null, descriptor: MPSGraphGRUDescriptor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func GRU(_ source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, inputWeight: MPSGraphTensor?, bias: MPSGraphTensor?, initState: MPSGraphTensor?, descriptor: MPSGraphGRUDescriptor, name: String?) -> [MPSGraphTensor]
method · iOS 16.0+

GRU

TypeScript
GRURecurrentWeightInputWeightBiasInitStateMaskSecondaryBiasDescriptorName(source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, inputWeight: (MPSGraphTensor) | null, bias: (MPSGraphTensor) | null, initState: (MPSGraphTensor) | null, mask: (MPSGraphTensor) | null, secondaryBias: (MPSGraphTensor) | null, descriptor: MPSGraphGRUDescriptor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func GRU(_ source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, inputWeight: MPSGraphTensor?, bias: MPSGraphTensor?, initState: MPSGraphTensor?, mask: MPSGraphTensor?, secondaryBias: MPSGraphTensor?, descriptor: MPSGraphGRUDescriptor, name: String?) -> [MPSGraphTensor]
method · iOS 16.0+

HammingDistance

TypeScript
HammingDistance(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, resultDataType: _MetalPerformanceShaders_MPSDataType, name?: (string) | null): MPSGraphTensor
Swift declaration
func HammingDistance(primary primaryTensor: MPSGraphTensor, secondary secondaryTensor: MPSGraphTensor, resultDataType: MPSDataType, name: String?) -> MPSGraphTensor
method · iOS 17.0+

HermiteanToRealFFT

TypeScript
HermiteanToRealFFTAxesDescriptorName(tensor: MPSGraphTensor, axes: Array<_Foundation_NSNumber>, descriptor: MPSGraphFFTDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func HermiteanToRealFFT(_ tensor: MPSGraphTensor, axes: [NSNumber], descriptor: MPSGraphFFTDescriptor, name: String?) -> MPSGraphTensor
method · iOS 17.0+

HermiteanToRealFFT

TypeScript
HermiteanToRealFFTAxesTensorDescriptorName(tensor: MPSGraphTensor, axesTensor: MPSGraphTensor, descriptor: MPSGraphFFTDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func HermiteanToRealFFT(_ tensor: MPSGraphTensor, axesTensor: MPSGraphTensor, descriptor: MPSGraphFFTDescriptor, name: String?) -> MPSGraphTensor
method · iOS 15.0+

L2NormPooling4DGradient

TypeScript
L2NormPooling4DGradient(gradient: MPSGraphTensor, source: MPSGraphTensor, descriptor: MPSGraphPooling4DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func L2NormPooling4DGradient(_ gradient: MPSGraphTensor, source: MPSGraphTensor, descriptor: MPSGraphPooling4DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 15.0+

L2NormPooling4D

TypeScript
L2NormPooling4D(source: MPSGraphTensor, descriptor: MPSGraphPooling4DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func L2NormPooling4D(_ source: MPSGraphTensor, descriptor: MPSGraphPooling4DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 15.4+

LSTMGradients

TypeScript
LSTMGradientsRecurrentWeightSourceGradientZStateCellOutputFwdDescriptorName(source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, sourceGradient: MPSGraphTensor, zState: MPSGraphTensor, cellOutputFwd: MPSGraphTensor, descriptor: MPSGraphLSTMDescriptor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func LSTMGradients(_ source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, sourceGradient: MPSGraphTensor, zState: MPSGraphTensor, cellOutputFwd: MPSGraphTensor, descriptor: MPSGraphLSTMDescriptor, name: String?) -> [MPSGraphTensor]
method · iOS 15.4+

LSTMGradients

TypeScript
LSTMGradientsRecurrentWeightSourceGradientZStateCellOutputFwdInputWeightBiasInitStateInitCellDescriptorName(source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, sourceGradient: MPSGraphTensor, zState: MPSGraphTensor, cellOutputFwd: MPSGraphTensor, inputWeight: (MPSGraphTensor) | null, bias: (MPSGraphTensor) | null, initState: (MPSGraphTensor) | null, initCell: (MPSGraphTensor) | null, descriptor: MPSGraphLSTMDescriptor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func LSTMGradients(_ source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, sourceGradient: MPSGraphTensor, zState: MPSGraphTensor, cellOutputFwd: MPSGraphTensor, inputWeight: MPSGraphTensor?, bias: MPSGraphTensor?, initState: MPSGraphTensor?, initCell: MPSGraphTensor?, descriptor: MPSGraphLSTMDescriptor, name: String?) -> [MPSGraphTensor]
method · iOS 15.4+

LSTMGradients

TypeScript
LSTMGradientsRecurrentWeightSourceGradientZStateCellOutputFwdInputWeightBiasInitStateInitCellMaskDescriptorName(source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, sourceGradient: MPSGraphTensor, zState: MPSGraphTensor, cellOutputFwd: MPSGraphTensor, inputWeight: (MPSGraphTensor) | null, bias: (MPSGraphTensor) | null, initState: (MPSGraphTensor) | null, initCell: (MPSGraphTensor) | null, mask: (MPSGraphTensor) | null, descriptor: MPSGraphLSTMDescriptor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func LSTMGradients(_ source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, sourceGradient: MPSGraphTensor, zState: MPSGraphTensor, cellOutputFwd: MPSGraphTensor, inputWeight: MPSGraphTensor?, bias: MPSGraphTensor?, initState: MPSGraphTensor?, initCell: MPSGraphTensor?, mask: MPSGraphTensor?, descriptor: MPSGraphLSTMDescriptor, name: String?) -> [MPSGraphTensor]
method · iOS 15.4+

LSTMGradients

TypeScript
LSTMGradientsRecurrentWeightSourceGradientZStateCellOutputFwdStateGradientCellGradientInputWeightBiasInitStateInitCellMaskPeepholeDescriptorName(source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, sourceGradient: MPSGraphTensor, zState: MPSGraphTensor, cellOutputFwd: MPSGraphTensor, stateGradient: (MPSGraphTensor) | null, cellGradient: (MPSGraphTensor) | null, inputWeight: (MPSGraphTensor) | null, bias: (MPSGraphTensor) | null, initState: (MPSGraphTensor) | null, initCell: (MPSGraphTensor) | null, mask: (MPSGraphTensor) | null, peephole: (MPSGraphTensor) | null, descriptor: MPSGraphLSTMDescriptor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func LSTMGradients(_ source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, sourceGradient: MPSGraphTensor, zState: MPSGraphTensor, cellOutputFwd: MPSGraphTensor, stateGradient: MPSGraphTensor?, cellGradient: MPSGraphTensor?, inputWeight: MPSGraphTensor?, bias: MPSGraphTensor?, initState: MPSGraphTensor?, initCell: MPSGraphTensor?, mask: MPSGraphTensor?, peephole: MPSGraphTensor?, descriptor: MPSGraphLSTMDescriptor, name: String?) -> [MPSGraphTensor]
method · iOS 15.4+

LSTM

TypeScript
LSTMRecurrentWeightInitStateInitCellDescriptorName(source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, initState: (MPSGraphTensor) | null, initCell: (MPSGraphTensor) | null, descriptor: MPSGraphLSTMDescriptor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func LSTM(_ source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, initState: MPSGraphTensor?, initCell: MPSGraphTensor?, descriptor: MPSGraphLSTMDescriptor, name: String?) -> [MPSGraphTensor]
method · iOS 15.4+

LSTM

TypeScript
LSTMRecurrentWeightInputWeightBiasInitStateInitCellDescriptorName(source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, inputWeight: (MPSGraphTensor) | null, bias: (MPSGraphTensor) | null, initState: (MPSGraphTensor) | null, initCell: (MPSGraphTensor) | null, descriptor: MPSGraphLSTMDescriptor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func LSTM(_ source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, inputWeight: MPSGraphTensor?, bias: MPSGraphTensor?, initState: MPSGraphTensor?, initCell: MPSGraphTensor?, descriptor: MPSGraphLSTMDescriptor, name: String?) -> [MPSGraphTensor]
method · iOS 15.4+

LSTM

TypeScript
LSTMRecurrentWeightInputWeightBiasInitStateInitCellMaskPeepholeDescriptorName(source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, inputWeight: (MPSGraphTensor) | null, bias: (MPSGraphTensor) | null, initState: (MPSGraphTensor) | null, initCell: (MPSGraphTensor) | null, mask: (MPSGraphTensor) | null, peephole: (MPSGraphTensor) | null, descriptor: MPSGraphLSTMDescriptor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func LSTM(_ source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, inputWeight: MPSGraphTensor?, bias: MPSGraphTensor?, initState: MPSGraphTensor?, initCell: MPSGraphTensor?, mask: MPSGraphTensor?, peephole: MPSGraphTensor?, descriptor: MPSGraphLSTMDescriptor, name: String?) -> [MPSGraphTensor]
method · iOS 17.0+

absoluteSquare

TypeScript
absoluteSquare(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func absoluteSquare(tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

absolute

TypeScript
absolute(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func absolute(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

acos

TypeScript
acos(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func acos(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

acosh

TypeScript
acosh(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func acosh(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

adam

TypeScript
adamCurrentLearningRateBeta1Beta2EpsilonValuesMomentumVelocityMaximumVelocityGradientName(currentLearningRateTensor: MPSGraphTensor, beta1Tensor: MPSGraphTensor, beta2Tensor: MPSGraphTensor, epsilonTensor: MPSGraphTensor, valuesTensor: MPSGraphTensor, momentumTensor: MPSGraphTensor, velocityTensor: MPSGraphTensor, maximumVelocityTensor: (MPSGraphTensor) | null, gradientTensor: MPSGraphTensor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func adam(currentLearningRate currentLearningRateTensor: MPSGraphTensor, beta1 beta1Tensor: MPSGraphTensor, beta2 beta2Tensor: MPSGraphTensor, epsilon epsilonTensor: MPSGraphTensor, values valuesTensor: MPSGraphTensor, momentum momentumTensor: MPSGraphTensor, velocity velocityTensor: MPSGraphTensor, maximumVelocity maximumVelocityTensor: MPSGraphTensor?, gradient gradientTensor: MPSGraphTensor, name: String?) -> [MPSGraphTensor]
method · iOS 14.0+

adam

TypeScript
adamLearningRateBeta1Beta2EpsilonBeta1PowerBeta2PowerValuesMomentumVelocityMaximumVelocityGradientName(learningRateTensor: MPSGraphTensor, beta1Tensor: MPSGraphTensor, beta2Tensor: MPSGraphTensor, epsilonTensor: MPSGraphTensor, beta1PowerTensor: MPSGraphTensor, beta2PowerTensor: MPSGraphTensor, valuesTensor: MPSGraphTensor, momentumTensor: MPSGraphTensor, velocityTensor: MPSGraphTensor, maximumVelocityTensor: (MPSGraphTensor) | null, gradientTensor: MPSGraphTensor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func adam(learningRate learningRateTensor: MPSGraphTensor, beta1 beta1Tensor: MPSGraphTensor, beta2 beta2Tensor: MPSGraphTensor, epsilon epsilonTensor: MPSGraphTensor, beta1Power beta1PowerTensor: MPSGraphTensor, beta2Power beta2PowerTensor: MPSGraphTensor, values valuesTensor: MPSGraphTensor, momentum momentumTensor: MPSGraphTensor, velocity velocityTensor: MPSGraphTensor, maximumVelocity maximumVelocityTensor: MPSGraphTensor?, gradient gradientTensor: MPSGraphTensor, name: String?) -> [MPSGraphTensor]
method · iOS 14.0+

addition

TypeScript
addition(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func addition(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

applyStochasticGradientDescent

TypeScript
applyStochasticGradientDescent(learningRateTensor: MPSGraphTensor, variable: MPSGraphVariableOp, gradientTensor: MPSGraphTensor, name?: (string) | null): MPSGraphOperation
Swift declaration
func applyStochasticGradientDescent(learningRate learningRateTensor: MPSGraphTensor, variable: MPSGraphVariableOp, gradient gradientTensor: MPSGraphTensor, name: String?) -> MPSGraphOperation
method · iOS 16.1+

argSort

TypeScript
argSortAxisDescendingName(tensor: MPSGraphTensor, axis: number, descending: boolean, name?: (string) | null): MPSGraphTensor
Swift declaration
func argSort(_ tensor: MPSGraphTensor, axis: Int, descending: Bool, name: String?) -> MPSGraphTensor
method · iOS 16.1+

argSort

TypeScript
argSortAxisName(tensor: MPSGraphTensor, axis: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func argSort(_ tensor: MPSGraphTensor, axis: Int, name: String?) -> MPSGraphTensor
method · iOS 16.1+

argSort

TypeScript
argSortAxisTensorDescendingName(tensor: MPSGraphTensor, axisTensor: MPSGraphTensor, descending: boolean, name?: (string) | null): MPSGraphTensor
Swift declaration
func argSort(_ tensor: MPSGraphTensor, axisTensor: MPSGraphTensor, descending: Bool, name: String?) -> MPSGraphTensor
method · iOS 16.1+

argSort

TypeScript
argSortAxisTensorName(tensor: MPSGraphTensor, axisTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func argSort(_ tensor: MPSGraphTensor, axisTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

asin

TypeScript
asin(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func asin(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

asinh

TypeScript
asinh(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func asinh(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

assign

TypeScript
assign(variable: MPSGraphTensor, tensor: MPSGraphTensor, name?: (string) | null): MPSGraphOperation
Swift declaration
func assign(_ variable: MPSGraphTensor, tensor: MPSGraphTensor, name: String?) -> MPSGraphOperation
method · iOS 14.0+

atan2

TypeScript
atan2(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func atan2(withPrimaryTensor primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

atan

TypeScript
atan(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func atan(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

atanh

TypeScript
atanh(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func atanh(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

avgPooling2DGradient

TypeScript
avgPooling2DGradient(gradient: MPSGraphTensor, source: MPSGraphTensor, descriptor: MPSGraphPooling2DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func avgPooling2DGradient(withGradientTensor gradient: MPSGraphTensor, sourceTensor source: MPSGraphTensor, descriptor: MPSGraphPooling2DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

avgPooling2D

TypeScript
avgPooling2D(source: MPSGraphTensor, descriptor: MPSGraphPooling2DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func avgPooling2D(withSourceTensor source: MPSGraphTensor, descriptor: MPSGraphPooling2DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 15.0+

avgPooling4DGradient

TypeScript
avgPooling4DGradient(gradient: MPSGraphTensor, source: MPSGraphTensor, descriptor: MPSGraphPooling4DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func avgPooling4DGradient(_ gradient: MPSGraphTensor, source: MPSGraphTensor, descriptor: MPSGraphPooling4DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 15.0+

avgPooling4D

TypeScript
avgPooling4D(source: MPSGraphTensor, descriptor: MPSGraphPooling4DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func avgPooling4D(_ source: MPSGraphTensor, descriptor: MPSGraphPooling4DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 15.4+

bandPart

TypeScript
bandPartNumLowerNumUpperName(inputTensor: MPSGraphTensor, numLower: number, numUpper: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func bandPart(_ inputTensor: MPSGraphTensor, numLower: Int, numUpper: Int, name: String?) -> MPSGraphTensor
method · iOS 15.4+

bandPart

TypeScript
bandPartNumLowerTensorNumUpperTensorName(inputTensor: MPSGraphTensor, numLowerTensor: MPSGraphTensor, numUpperTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func bandPart(_ inputTensor: MPSGraphTensor, numLowerTensor: MPSGraphTensor, numUpperTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 16.1+

batchToSpace

TypeScript
batchToSpaceSpatialAxesBatchAxisBlockDimensionsUsePixelShuffleOrderName(tensor: MPSGraphTensor, spatialAxes: Array<_Foundation_NSNumber>, batchAxis: number, blockDimensions: Array<_Foundation_NSNumber>, usePixelShuffleOrder: boolean, name?: (string) | null): MPSGraphTensor
Swift declaration
func batchToSpace(_ tensor: MPSGraphTensor, spatialAxes: [NSNumber], batchAxis: Int, blockDimensions: [NSNumber], usePixelShuffleOrder: Bool, name: String?) -> MPSGraphTensor
method · iOS 16.1+

batchToSpace

TypeScript
batchToSpaceSpatialAxesTensorBatchAxisTensorBlockDimensionsTensorUsePixelShuffleOrderName(tensor: MPSGraphTensor, spatialAxesTensor: MPSGraphTensor, batchAxisTensor: MPSGraphTensor, blockDimensionsTensor: MPSGraphTensor, usePixelShuffleOrder: boolean, name?: (string) | null): MPSGraphTensor
Swift declaration
func batchToSpace(_ tensor: MPSGraphTensor, spatialAxesTensor: MPSGraphTensor, batchAxisTensor: MPSGraphTensor, blockDimensionsTensor: MPSGraphTensor, usePixelShuffleOrder: Bool, name: String?) -> MPSGraphTensor
method · iOS 16.1+

bitwiseAND

TypeScript
bitwiseAND(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func bitwiseAND(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 16.1+

bitwiseLeftShift

TypeScript
bitwiseLeftShift(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func bitwiseLeftShift(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 16.1+

bitwiseNOT

TypeScript
bitwiseNOT(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func bitwiseNOT(_ tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 16.1+

bitwiseOR

TypeScript
bitwiseOR(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func bitwiseOR(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 16.1+

bitwisePopulationCount

TypeScript
bitwisePopulationCount(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func bitwisePopulationCount(_ tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 16.1+

bitwiseRightShift

TypeScript
bitwiseRightShift(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func bitwiseRightShift(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 16.1+

bitwiseXOR

TypeScript
bitwiseXOR(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func bitwiseXOR(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 17.0+

bottomKGradient

TypeScript
bottomKGradientSourceAxisKName(gradient: MPSGraphTensor, source: MPSGraphTensor, axis: number, k: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func bottomKGradient(_ gradient: MPSGraphTensor, source: MPSGraphTensor, axis: Int, k: Int, name: String?) -> MPSGraphTensor
method · iOS 17.0+

bottomKGradient

TypeScript
bottomKGradientSourceAxisTensorKTensorName(gradient: MPSGraphTensor, source: MPSGraphTensor, axisTensor: MPSGraphTensor, kTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func bottomKGradient(_ gradient: MPSGraphTensor, source: MPSGraphTensor, axisTensor: MPSGraphTensor, kTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 17.0+

bottomK

TypeScript
bottomKAxisKName(source: MPSGraphTensor, axis: number, k: number, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func bottomK(_ source: MPSGraphTensor, axis: Int, k: Int, name: String?) -> [MPSGraphTensor]
method · iOS 17.0+

bottomK

TypeScript
bottomKAxisTensorKTensorName(source: MPSGraphTensor, axisTensor: MPSGraphTensor, kTensor: MPSGraphTensor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func bottomK(_ source: MPSGraphTensor, axisTensor: MPSGraphTensor, kTensor: MPSGraphTensor, name: String?) -> [MPSGraphTensor]
method · iOS 15.0+

broadcast

TypeScript
broadcastShapeName(tensor: MPSGraphTensor, shape: Array<_Foundation_NSNumber>, name?: (string) | null): MPSGraphTensor
Swift declaration
func broadcast(_ tensor: MPSGraphTensor, shape: [NSNumber], name: String?) -> MPSGraphTensor
method · iOS 15.0+

broadcast

TypeScript
broadcastShapeTensorName(tensor: MPSGraphTensor, shapeTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func broadcast(_ tensor: MPSGraphTensor, shapeTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 18.0+

call

TypeScript
call(symbolName: string, inputTensors: Array<MPSGraphTensor>, outputTypes: Array<MPSGraphType>, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func call(symbolName: String, inputTensors: [MPSGraphTensor], outputTypes: [MPSGraphType], name: String?) -> [MPSGraphTensor]
method · iOS 15.0+

cast

TypeScript
cast(tensor: MPSGraphTensor, type: _MetalPerformanceShaders_MPSDataType, name?: (string) | null): MPSGraphTensor
Swift declaration
func cast(_ tensor: MPSGraphTensor, to type: MPSDataType, name: String?) -> MPSGraphTensor
method · iOS 14.0+

ceil

TypeScript
ceil(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func ceil(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

clamp

TypeScript
clamp(tensor: MPSGraphTensor, minValueTensor: MPSGraphTensor, maxValueTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func clamp(_ tensor: MPSGraphTensor, min minValueTensor: MPSGraphTensor, max maxValueTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

colToIm

TypeScript
colToIm(source: MPSGraphTensor, outputShape: Array<_Foundation_NSNumber>, descriptor: MPSGraphImToColOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func colToIm(_ source: MPSGraphTensor, outputShape: [NSNumber], descriptor: MPSGraphImToColOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 15.0+

compile

TypeScript
compile(device: (MPSGraphDevice) | null, feeds: NativeMap<MPSGraphTensor, MPSGraphShapedType>, targetTensors: Array<MPSGraphTensor>, targetOperations?: (Array<MPSGraphOperation>) | null, compilationDescriptor?: (MPSGraphCompilationDescriptor) | null): MPSGraphExecutable
Swift declaration
func compile(with device: MPSGraphDevice?, feeds: [MPSGraphTensor : MPSGraphShapedType], targetTensors: [MPSGraphTensor], targetOperations: [MPSGraphOperation]?, compilationDescriptor: MPSGraphCompilationDescriptor?) -> MPSGraphExecutable
method · iOS 17.0+

complexTensor

TypeScript
complexTensor(realTensor: MPSGraphTensor, imaginaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func complexTensor(realTensor: MPSGraphTensor, imaginaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

concatTensor

TypeScript
concatTensor(tensor: MPSGraphTensor, tensor2: MPSGraphTensor, dimensionIndex: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func concatTensor(_ tensor: MPSGraphTensor, with tensor2: MPSGraphTensor, dimension dimensionIndex: Int, name: String?) -> MPSGraphTensor
method · iOS 14.0+

concatTensors

TypeScript
concatTensorsDimensionInterleaveName(tensors: Array<MPSGraphTensor>, dimensionIndex: number, interleave: boolean, name?: (string) | null): MPSGraphTensor
Swift declaration
func concatTensors(_ tensors: [MPSGraphTensor], dimension dimensionIndex: Int, interleave: Bool, name: String?) -> MPSGraphTensor
method · iOS 14.0+

concatTensors

TypeScript
concatTensorsDimensionName(tensors: Array<MPSGraphTensor>, dimensionIndex: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func concatTensors(_ tensors: [MPSGraphTensor], dimension dimensionIndex: Int, name: String?) -> MPSGraphTensor
method · iOS 17.0+

conjugate

TypeScript
conjugate(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func conjugate(tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

constant

TypeScript
constantShapeDataType(data: ArrayBuffer, shape: Array<_Foundation_NSNumber>, dataType: _MetalPerformanceShaders_MPSDataType): MPSGraphTensor
Swift declaration
func constant(_ data: Data, shape: [NSNumber], dataType: MPSDataType) -> MPSGraphTensor
method · iOS 17.0+

complexConstant

TypeScript
complexConstantRealPartImaginaryPart(realPart: number, imaginaryPart: number): MPSGraphTensor
Swift declaration
func complexConstant(realPart: Double, imaginaryPart: Double) -> MPSGraphTensor
method · iOS 17.0+

complexConstant

TypeScript
complexConstantRealPartImaginaryPartDataType(realPart: number, imaginaryPart: number, dataType: _MetalPerformanceShaders_MPSDataType): MPSGraphTensor
Swift declaration
func complexConstant(realPart: Double, imaginaryPart: Double, dataType: MPSDataType) -> MPSGraphTensor
method · iOS 17.0+

complexConstant

TypeScript
complexConstantRealPartImaginaryPartShapeDataType(realPart: number, imaginaryPart: number, shape: Array<_Foundation_NSNumber>, dataType: _MetalPerformanceShaders_MPSDataType): MPSGraphTensor
Swift declaration
func complexConstant(realPart: Double, imaginaryPart: Double, shape: [NSNumber], dataType: MPSDataType) -> MPSGraphTensor
method · iOS 14.0+

constant

TypeScript
constantDataType(scalar: number, dataType: _MetalPerformanceShaders_MPSDataType): MPSGraphTensor
Swift declaration
func constant(_ scalar: Double, dataType: MPSDataType) -> MPSGraphTensor
method · iOS 14.0+

constant

TypeScript
constantShapeDataType74923(scalar: number, shape: Array<_Foundation_NSNumber>, dataType: _MetalPerformanceShaders_MPSDataType): MPSGraphTensor
Swift declaration
func constant(_ scalar: Double, shape: [NSNumber], dataType: MPSDataType) -> MPSGraphTensor
method · iOS 14.0+

convolution2DDataGradient

TypeScript
convolution2DDataGradientWeightsOutputShapeForwardConvolutionDescriptorName(incomingGradient: MPSGraphTensor, weights: MPSGraphTensor, outputShape: Array<_Foundation_NSNumber>, forwardConvolutionDescriptor: MPSGraphConvolution2DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func convolution2DDataGradient(_ incomingGradient: MPSGraphTensor, weights: MPSGraphTensor, outputShape: [NSNumber], forwardConvolutionDescriptor: MPSGraphConvolution2DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 15.0+

convolution2DDataGradient

TypeScript
convolution2DDataGradientWeightsOutputShapeTensorForwardConvolutionDescriptorName(gradient: MPSGraphTensor, weights: MPSGraphTensor, outputShapeTensor: MPSGraphTensor, forwardConvolutionDescriptor: MPSGraphConvolution2DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func convolution2DDataGradient(_ gradient: MPSGraphTensor, weights: MPSGraphTensor, outputShapeTensor: MPSGraphTensor, forwardConvolutionDescriptor: MPSGraphConvolution2DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

convolution2DWeightsGradient

TypeScript
convolution2DWeightsGradientSourceOutputShapeForwardConvolutionDescriptorName(incomingGradient: MPSGraphTensor, source: MPSGraphTensor, outputShape: Array<_Foundation_NSNumber>, forwardConvolutionDescriptor: MPSGraphConvolution2DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func convolution2DWeightsGradient(_ incomingGradient: MPSGraphTensor, source: MPSGraphTensor, outputShape: [NSNumber], forwardConvolutionDescriptor: MPSGraphConvolution2DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 15.0+

convolution2DWeightsGradient

TypeScript
convolution2DWeightsGradientSourceOutputShapeTensorForwardConvolutionDescriptorName(gradient: MPSGraphTensor, source: MPSGraphTensor, outputShapeTensor: MPSGraphTensor, forwardConvolutionDescriptor: MPSGraphConvolution2DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func convolution2DWeightsGradient(_ gradient: MPSGraphTensor, source: MPSGraphTensor, outputShapeTensor: MPSGraphTensor, forwardConvolutionDescriptor: MPSGraphConvolution2DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

convolution2D

TypeScript
convolution2D(source: MPSGraphTensor, weights: MPSGraphTensor, descriptor: MPSGraphConvolution2DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func convolution2D(_ source: MPSGraphTensor, weights: MPSGraphTensor, descriptor: MPSGraphConvolution2DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 16.3+

convolution3DDataGradient

TypeScript
convolution3DDataGradientWeightsOutputShapeForwardConvolutionDescriptorName(incomingGradient: MPSGraphTensor, weights: MPSGraphTensor, outputShape: Array<_Foundation_NSNumber>, forwardConvolutionDescriptor: MPSGraphConvolution3DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func convolution3DDataGradient(_ incomingGradient: MPSGraphTensor, weights: MPSGraphTensor, outputShape: [NSNumber], forwardConvolutionDescriptor: MPSGraphConvolution3DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 16.3+

convolution3DDataGradient

TypeScript
convolution3DDataGradientWeightsOutputShapeTensorForwardConvolutionDescriptorName(gradient: MPSGraphTensor, weights: MPSGraphTensor, outputShapeTensor: MPSGraphTensor, forwardConvolutionDescriptor: MPSGraphConvolution3DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func convolution3DDataGradient(_ gradient: MPSGraphTensor, weights: MPSGraphTensor, outputShapeTensor: MPSGraphTensor, forwardConvolutionDescriptor: MPSGraphConvolution3DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 16.3+

convolution3DWeightsGradient

TypeScript
convolution3DWeightsGradientSourceOutputShapeForwardConvolutionDescriptorName(incomingGradient: MPSGraphTensor, source: MPSGraphTensor, outputShape: Array<_Foundation_NSNumber>, forwardConvolutionDescriptor: MPSGraphConvolution3DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func convolution3DWeightsGradient(_ incomingGradient: MPSGraphTensor, source: MPSGraphTensor, outputShape: [NSNumber], forwardConvolutionDescriptor: MPSGraphConvolution3DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 16.3+

convolution3DWeightsGradient

TypeScript
convolution3DWeightsGradientSourceOutputShapeTensorForwardConvolutionDescriptorName(gradient: MPSGraphTensor, source: MPSGraphTensor, outputShapeTensor: MPSGraphTensor, forwardConvolutionDescriptor: MPSGraphConvolution3DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func convolution3DWeightsGradient(_ gradient: MPSGraphTensor, source: MPSGraphTensor, outputShapeTensor: MPSGraphTensor, forwardConvolutionDescriptor: MPSGraphConvolution3DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 16.3+

convolution3D

TypeScript
convolution3D(source: MPSGraphTensor, weights: MPSGraphTensor, descriptor: MPSGraphConvolution3DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func convolution3D(_ source: MPSGraphTensor, weights: MPSGraphTensor, descriptor: MPSGraphConvolution3DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

convolutionTranspose2DDataGradient

TypeScript
convolutionTranspose2DDataGradientWeightsOutputShapeForwardConvolutionDescriptorName(incomingGradient: MPSGraphTensor, weights: MPSGraphTensor, outputShape: Array<_Foundation_NSNumber>, forwardConvolutionDescriptor: MPSGraphConvolution2DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func convolutionTranspose2DDataGradient(_ incomingGradient: MPSGraphTensor, weights: MPSGraphTensor, outputShape: [NSNumber], forwardConvolutionDescriptor: MPSGraphConvolution2DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 15.0+

convolutionTranspose2DDataGradient

TypeScript
convolutionTranspose2DDataGradientWeightsOutputShapeTensorForwardConvolutionDescriptorName(incomingGradient: MPSGraphTensor, weights: MPSGraphTensor, outputShape: MPSGraphTensor, forwardConvolutionDescriptor: MPSGraphConvolution2DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func convolutionTranspose2DDataGradient(_ incomingGradient: MPSGraphTensor, weights: MPSGraphTensor, outputShapeTensor outputShape: MPSGraphTensor, forwardConvolutionDescriptor: MPSGraphConvolution2DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

convolutionTranspose2DWeightsGradient

TypeScript
convolutionTranspose2DWeightsGradientWeightsOutputShapeForwardConvolutionDescriptorName(incomingGradientTensor: MPSGraphTensor, source: MPSGraphTensor, outputShape: Array<_Foundation_NSNumber>, forwardConvolutionDescriptor: MPSGraphConvolution2DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func convolutionTranspose2DWeightsGradient(_ incomingGradientTensor: MPSGraphTensor, weights source: MPSGraphTensor, outputShape: [NSNumber], forwardConvolutionDescriptor: MPSGraphConvolution2DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 15.0+

convolutionTranspose2DWeightsGradient

TypeScript
convolutionTranspose2DWeightsGradientWeightsOutputShapeTensorForwardConvolutionDescriptorName(incomingGradientTensor: MPSGraphTensor, source: MPSGraphTensor, outputShape: MPSGraphTensor, forwardConvolutionDescriptor: MPSGraphConvolution2DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func convolutionTranspose2DWeightsGradient(_ incomingGradientTensor: MPSGraphTensor, weights source: MPSGraphTensor, outputShapeTensor outputShape: MPSGraphTensor, forwardConvolutionDescriptor: MPSGraphConvolution2DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

convolutionTranspose2D

TypeScript
convolutionTranspose2DWeightsOutputShapeDescriptorName(source: MPSGraphTensor, weights: MPSGraphTensor, outputShape: Array<_Foundation_NSNumber>, descriptor: MPSGraphConvolution2DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func convolutionTranspose2D(_ source: MPSGraphTensor, weights: MPSGraphTensor, outputShape: [NSNumber], descriptor: MPSGraphConvolution2DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 15.0+

convolutionTranspose2D

TypeScript
convolutionTranspose2DWeightsOutputShapeTensorDescriptorName(source: MPSGraphTensor, weights: MPSGraphTensor, outputShape: MPSGraphTensor, descriptor: MPSGraphConvolution2DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func convolutionTranspose2D(_ source: MPSGraphTensor, weights: MPSGraphTensor, outputShapeTensor outputShape: MPSGraphTensor, descriptor: MPSGraphConvolution2DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 15.4+

coordinate

TypeScript
coordinateAlongAxisWithShapeName(axis: number, shape: Array<_Foundation_NSNumber>, name?: (string) | null): MPSGraphTensor
Swift declaration
func coordinate(alongAxis axis: Int, withShape shape: [NSNumber], name: String?) -> MPSGraphTensor
method · iOS 15.4+

coordinate

TypeScript
coordinateAlongAxisWithShapeTensorName(axis: number, shapeTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func coordinate(alongAxis axis: Int, withShapeTensor shapeTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 15.4+

coordinate

TypeScript
coordinateAlongAxisTensorWithShapeName(axisTensor: MPSGraphTensor, shape: Array<_Foundation_NSNumber>, name?: (string) | null): MPSGraphTensor
Swift declaration
func coordinate(alongAxisTensor axisTensor: MPSGraphTensor, withShape shape: [NSNumber], name: String?) -> MPSGraphTensor
method · iOS 15.4+

coordinate

TypeScript
coordinateAlongAxisTensorWithShapeTensorName(axisTensor: MPSGraphTensor, shapeTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func coordinate(alongAxisTensor axisTensor: MPSGraphTensor, withShapeTensor shapeTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

cos

TypeScript
cos(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func cos(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

cosh

TypeScript
cosh(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func cosh(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 16.0+

cumulativeMaximum

TypeScript
cumulativeMaximumAxisExclusiveReverseName(tensor: MPSGraphTensor, axis: number, exclusive: boolean, reverse: boolean, name?: (string) | null): MPSGraphTensor
Swift declaration
func cumulativeMaximum(_ tensor: MPSGraphTensor, axis: Int, exclusive: Bool, reverse: Bool, name: String?) -> MPSGraphTensor
method · iOS 16.0+

cumulativeMaximum

TypeScript
cumulativeMaximumAxisName(tensor: MPSGraphTensor, axis: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func cumulativeMaximum(_ tensor: MPSGraphTensor, axis: Int, name: String?) -> MPSGraphTensor
method · iOS 16.0+

cumulativeMaximum

TypeScript
cumulativeMaximumAxisTensorExclusiveReverseName(tensor: MPSGraphTensor, axisTensor: MPSGraphTensor, exclusive: boolean, reverse: boolean, name?: (string) | null): MPSGraphTensor
Swift declaration
func cumulativeMaximum(_ tensor: MPSGraphTensor, axisTensor: MPSGraphTensor, exclusive: Bool, reverse: Bool, name: String?) -> MPSGraphTensor
method · iOS 16.0+

cumulativeMaximum

TypeScript
cumulativeMaximumAxisTensorName(tensor: MPSGraphTensor, axisTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func cumulativeMaximum(_ tensor: MPSGraphTensor, axisTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 16.0+

cumulativeMinimum

TypeScript
cumulativeMinimumAxisExclusiveReverseName(tensor: MPSGraphTensor, axis: number, exclusive: boolean, reverse: boolean, name?: (string) | null): MPSGraphTensor
Swift declaration
func cumulativeMinimum(_ tensor: MPSGraphTensor, axis: Int, exclusive: Bool, reverse: Bool, name: String?) -> MPSGraphTensor
method · iOS 16.0+

cumulativeMinimum

TypeScript
cumulativeMinimumAxisName(tensor: MPSGraphTensor, axis: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func cumulativeMinimum(_ tensor: MPSGraphTensor, axis: Int, name: String?) -> MPSGraphTensor
method · iOS 16.0+

cumulativeMinimum

TypeScript
cumulativeMinimumAxisTensorExclusiveReverseName(tensor: MPSGraphTensor, axisTensor: MPSGraphTensor, exclusive: boolean, reverse: boolean, name?: (string) | null): MPSGraphTensor
Swift declaration
func cumulativeMinimum(_ tensor: MPSGraphTensor, axisTensor: MPSGraphTensor, exclusive: Bool, reverse: Bool, name: String?) -> MPSGraphTensor
method · iOS 16.0+

cumulativeMinimum

TypeScript
cumulativeMinimumAxisTensorName(tensor: MPSGraphTensor, axisTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func cumulativeMinimum(_ tensor: MPSGraphTensor, axisTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 16.0+

cumulativeProduct

TypeScript
cumulativeProductAxisExclusiveReverseName(tensor: MPSGraphTensor, axis: number, exclusive: boolean, reverse: boolean, name?: (string) | null): MPSGraphTensor
Swift declaration
func cumulativeProduct(_ tensor: MPSGraphTensor, axis: Int, exclusive: Bool, reverse: Bool, name: String?) -> MPSGraphTensor
method · iOS 16.0+

cumulativeProduct

TypeScript
cumulativeProductAxisName(tensor: MPSGraphTensor, axis: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func cumulativeProduct(_ tensor: MPSGraphTensor, axis: Int, name: String?) -> MPSGraphTensor
method · iOS 16.0+

cumulativeProduct

TypeScript
cumulativeProductAxisTensorExclusiveReverseName(tensor: MPSGraphTensor, axisTensor: MPSGraphTensor, exclusive: boolean, reverse: boolean, name?: (string) | null): MPSGraphTensor
Swift declaration
func cumulativeProduct(_ tensor: MPSGraphTensor, axisTensor: MPSGraphTensor, exclusive: Bool, reverse: Bool, name: String?) -> MPSGraphTensor
method · iOS 16.0+

cumulativeProduct

TypeScript
cumulativeProductAxisTensorName(tensor: MPSGraphTensor, axisTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func cumulativeProduct(_ tensor: MPSGraphTensor, axisTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 16.0+

cumulativeSum

TypeScript
cumulativeSumAxisExclusiveReverseName(tensor: MPSGraphTensor, axis: number, exclusive: boolean, reverse: boolean, name?: (string) | null): MPSGraphTensor
Swift declaration
func cumulativeSum(_ tensor: MPSGraphTensor, axis: Int, exclusive: Bool, reverse: Bool, name: String?) -> MPSGraphTensor
method · iOS 16.0+

cumulativeSum

TypeScript
cumulativeSumAxisName(tensor: MPSGraphTensor, axis: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func cumulativeSum(_ tensor: MPSGraphTensor, axis: Int, name: String?) -> MPSGraphTensor
method · iOS 16.0+

cumulativeSum

TypeScript
cumulativeSumAxisTensorExclusiveReverseName(tensor: MPSGraphTensor, axisTensor: MPSGraphTensor, exclusive: boolean, reverse: boolean, name?: (string) | null): MPSGraphTensor
Swift declaration
func cumulativeSum(_ tensor: MPSGraphTensor, axisTensor: MPSGraphTensor, exclusive: Bool, reverse: Bool, name: String?) -> MPSGraphTensor
method · iOS 16.0+

cumulativeSum

TypeScript
cumulativeSumAxisTensorName(tensor: MPSGraphTensor, axisTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func cumulativeSum(_ tensor: MPSGraphTensor, axisTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 15.0+

depth

TypeScript
depthToSpace2DTensorWidthAxisHeightAxisDepthAxisBlockSizeUsePixelShuffleOrderName(tensor: MPSGraphTensor, widthAxis: number, heightAxis: number, depthAxis: number, blockSize: number, usePixelShuffleOrder: boolean, name?: (string) | null): MPSGraphTensor
Swift declaration
func depth(toSpace2DTensor tensor: MPSGraphTensor, widthAxis: Int, heightAxis: Int, depthAxis: Int, blockSize: Int, usePixelShuffleOrder: Bool, name: String?) -> MPSGraphTensor
method · iOS 15.0+

depth

TypeScript
depthToSpace2DTensorWidthAxisTensorHeightAxisTensorDepthAxisTensorBlockSizeUsePixelShuffleOrderName(tensor: MPSGraphTensor, widthAxisTensor: MPSGraphTensor, heightAxisTensor: MPSGraphTensor, depthAxisTensor: MPSGraphTensor, blockSize: number, usePixelShuffleOrder: boolean, name?: (string) | null): MPSGraphTensor
Swift declaration
func depth(toSpace2DTensor tensor: MPSGraphTensor, widthAxisTensor: MPSGraphTensor, heightAxisTensor: MPSGraphTensor, depthAxisTensor: MPSGraphTensor, blockSize: Int, usePixelShuffleOrder: Bool, name: String?) -> MPSGraphTensor
method · iOS 14.0+

depthwiseConvolution2DDataGradient

TypeScript
depthwiseConvolution2DDataGradient(incomingGradient: MPSGraphTensor, weights: MPSGraphTensor, outputShape: Array<_Foundation_NSNumber>, descriptor: MPSGraphDepthwiseConvolution2DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func depthwiseConvolution2DDataGradient(_ incomingGradient: MPSGraphTensor, weights: MPSGraphTensor, outputShape: [NSNumber], descriptor: MPSGraphDepthwiseConvolution2DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

depthwiseConvolution2DWeightsGradient

TypeScript
depthwiseConvolution2DWeightsGradient(incomingGradient: MPSGraphTensor, source: MPSGraphTensor, outputShape: Array<_Foundation_NSNumber>, descriptor: MPSGraphDepthwiseConvolution2DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func depthwiseConvolution2DWeightsGradient(_ incomingGradient: MPSGraphTensor, source: MPSGraphTensor, outputShape: [NSNumber], descriptor: MPSGraphDepthwiseConvolution2DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

depthwiseConvolution2D

TypeScript
depthwiseConvolution2D(source: MPSGraphTensor, weights: MPSGraphTensor, descriptor: MPSGraphDepthwiseConvolution2DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func depthwiseConvolution2D(_ source: MPSGraphTensor, weights: MPSGraphTensor, descriptor: MPSGraphDepthwiseConvolution2DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 15.0+

depthwiseConvolution3DDataGradient

TypeScript
depthwiseConvolution3DDataGradient(incomingGradient: MPSGraphTensor, weights: MPSGraphTensor, outputShape: (Array<_Foundation_NSNumber>) | null, descriptor: MPSGraphDepthwiseConvolution3DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func depthwiseConvolution3DDataGradient(_ incomingGradient: MPSGraphTensor, weights: MPSGraphTensor, outputShape: [NSNumber]?, descriptor: MPSGraphDepthwiseConvolution3DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

depthwiseConvolution3DWeightsGradient

TypeScript
depthwiseConvolution3DWeightsGradient(incomingGradient: MPSGraphTensor, source: MPSGraphTensor, outputShape: Array<_Foundation_NSNumber>, descriptor: MPSGraphDepthwiseConvolution3DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func depthwiseConvolution3DWeightsGradient(_ incomingGradient: MPSGraphTensor, source: MPSGraphTensor, outputShape: [NSNumber], descriptor: MPSGraphDepthwiseConvolution3DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 15.0+

depthwiseConvolution3D

TypeScript
depthwiseConvolution3D(source: MPSGraphTensor, weights: MPSGraphTensor, descriptor: MPSGraphDepthwiseConvolution3DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func depthwiseConvolution3D(_ source: MPSGraphTensor, weights: MPSGraphTensor, descriptor: MPSGraphDepthwiseConvolution3DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 18.0+

dequantize

TypeScript
dequantizeLUTTensorAxisName(tensor: MPSGraphTensor, LUTTensor: MPSGraphTensor, axis: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func dequantize(_ tensor: MPSGraphTensor, LUTTensor: MPSGraphTensor, axis: Int, name: String?) -> MPSGraphTensor
method · iOS 18.0+

dequantize

TypeScript
dequantizeLUTTensorName(tensor: MPSGraphTensor, LUTTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func dequantize(_ tensor: MPSGraphTensor, LUTTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 16.2+

dequantize

TypeScript
dequantizeScaleZeroPointDataTypeName(tensor: MPSGraphTensor, scale: number, zeroPoint: number, dataType: _MetalPerformanceShaders_MPSDataType, name?: (string) | null): MPSGraphTensor
Swift declaration
func dequantize(_ tensor: MPSGraphTensor, scale: Double, zeroPoint: Double, dataType: MPSDataType, name: String?) -> MPSGraphTensor
method · iOS 18.0+

dequantize

TypeScript
dequantizeScaleTensorDataTypeName(tensor: MPSGraphTensor, scaleTensor: MPSGraphTensor, dataType: _MetalPerformanceShaders_MPSDataType, name?: (string) | null): MPSGraphTensor
Swift declaration
func dequantize(_ tensor: MPSGraphTensor, scaleTensor: MPSGraphTensor, dataType: MPSDataType, name: String?) -> MPSGraphTensor
method · iOS 16.2+

dequantize

TypeScript
dequantizeScaleTensorZeroPointDataTypeAxisName(tensor: MPSGraphTensor, scaleTensor: MPSGraphTensor, zeroPoint: number, dataType: _MetalPerformanceShaders_MPSDataType, axis: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func dequantize(_ tensor: MPSGraphTensor, scaleTensor: MPSGraphTensor, zeroPoint: Double, dataType: MPSDataType, axis: Int, name: String?) -> MPSGraphTensor
method · iOS 16.2+

dequantize

TypeScript
dequantizeScaleTensorZeroPointTensorDataTypeAxisName(tensor: MPSGraphTensor, scaleTensor: MPSGraphTensor, zeroPointTensor: MPSGraphTensor, dataType: _MetalPerformanceShaders_MPSDataType, axis: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func dequantize(_ tensor: MPSGraphTensor, scaleTensor: MPSGraphTensor, zeroPointTensor: MPSGraphTensor, dataType: MPSDataType, axis: Int, name: String?) -> MPSGraphTensor
method · iOS 18.0+

dequantize

TypeScript
dequantizeScaleTensorZeroPointTensorDataTypeName(tensor: MPSGraphTensor, scaleTensor: MPSGraphTensor, zeroPointTensor: MPSGraphTensor, dataType: _MetalPerformanceShaders_MPSDataType, name?: (string) | null): MPSGraphTensor
Swift declaration
func dequantize(_ tensor: MPSGraphTensor, scaleTensor: MPSGraphTensor, zeroPointTensor: MPSGraphTensor, dataType: MPSDataType, name: String?) -> MPSGraphTensor
method · iOS 14.0+

divisionNoNaN

TypeScript
divisionNoNaN(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func divisionNoNaN(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

division

TypeScript
division(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func division(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

dropout

TypeScript
dropoutRateName(tensor: MPSGraphTensor, rate: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func dropout(_ tensor: MPSGraphTensor, rate: Double, name: String?) -> MPSGraphTensor
method · iOS 14.0+

dropout

TypeScript
dropoutRateName85178(tensor: MPSGraphTensor, rate: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func dropout(_ tensor: MPSGraphTensor, rate: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

encode

TypeScript
encodeToFeedsTargetOperationsResultsDictionaryExecutionDescriptor(commandBuffer: _MetalPerformanceShaders_MPSCommandBuffer, feeds: NativeMap<MPSGraphTensor, MPSGraphTensorData>, targetOperations: (Array<MPSGraphOperation>) | null, resultsDictionary: NativeMap<MPSGraphTensor, MPSGraphTensorData>, executionDescriptor?: (MPSGraphExecutionDescriptor) | null): void
Swift declaration
func encode(to commandBuffer: MPSCommandBuffer, feeds: [MPSGraphTensor : MPSGraphTensorData], targetOperations: [MPSGraphOperation]?, resultsDictionary: [MPSGraphTensor : MPSGraphTensorData], executionDescriptor: MPSGraphExecutionDescriptor?)
method · iOS 14.0+

encode

TypeScript
encodeToFeedsTargetTensorsTargetOperationsExecutionDescriptor(commandBuffer: _MetalPerformanceShaders_MPSCommandBuffer, feeds: NativeMap<MPSGraphTensor, MPSGraphTensorData>, targetTensors: Array<MPSGraphTensor>, targetOperations?: (Array<MPSGraphOperation>) | null, executionDescriptor?: (MPSGraphExecutionDescriptor) | null): NativeMap<MPSGraphTensor, MPSGraphTensorData>
Swift declaration
func encode(to commandBuffer: MPSCommandBuffer, feeds: [MPSGraphTensor : MPSGraphTensorData], targetTensors: [MPSGraphTensor], targetOperations: [MPSGraphOperation]?, executionDescriptor: MPSGraphExecutionDescriptor?) -> [MPSGraphTensor : MPSGraphTensorData]
method · iOS 14.0+

equal

TypeScript
equal(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func equal(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

erf

TypeScript
erf(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func erf(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 15.4+

expandDims

TypeScript
expandDimsAxesName(tensor: MPSGraphTensor, axes: Array<_Foundation_NSNumber>, name?: (string) | null): MPSGraphTensor
Swift declaration
func expandDims(_ tensor: MPSGraphTensor, axes: [NSNumber], name: String?) -> MPSGraphTensor
method · iOS 15.4+

expandDims

TypeScript
expandDimsAxesTensorName(tensor: MPSGraphTensor, axesTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func expandDims(_ tensor: MPSGraphTensor, axesTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 15.4+

expandDims

TypeScript
expandDimsAxisName(tensor: MPSGraphTensor, axis: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func expandDims(_ tensor: MPSGraphTensor, axis: Int, name: String?) -> MPSGraphTensor
method · iOS 14.0+

exponentBase10

TypeScript
exponentBase10(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func exponentBase10(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

exponentBase2

TypeScript
exponentBase2(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func exponentBase2(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

exponent

TypeScript
exponent(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func exponent(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 17.0+

fastFourierTransform

TypeScript
fastFourierTransformAxesDescriptorName(tensor: MPSGraphTensor, axes: Array<_Foundation_NSNumber>, descriptor: MPSGraphFFTDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func fastFourierTransform(_ tensor: MPSGraphTensor, axes: [NSNumber], descriptor: MPSGraphFFTDescriptor, name: String?) -> MPSGraphTensor
method · iOS 17.0+

fastFourierTransform

TypeScript
fastFourierTransformAxesTensorDescriptorName(tensor: MPSGraphTensor, axesTensor: MPSGraphTensor, descriptor: MPSGraphFFTDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func fastFourierTransform(_ tensor: MPSGraphTensor, axesTensor: MPSGraphTensor, descriptor: MPSGraphFFTDescriptor, name: String?) -> MPSGraphTensor
method · iOS 15.0+

flatten2D

TypeScript
flatten2DAxisName(tensor: MPSGraphTensor, axis: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func flatten2D(_ tensor: MPSGraphTensor, axis: Int, name: String?) -> MPSGraphTensor
method · iOS 15.0+

flatten2D

TypeScript
flatten2DAxisTensorName(tensor: MPSGraphTensor, axisTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func flatten2D(_ tensor: MPSGraphTensor, axisTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

floorModulo

TypeScript
floorModulo(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func floorModulo(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

floor

TypeScript
floor(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func floor(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 15.4+

gatherAlongAxis

TypeScript
gatherAlongAxis(axis: number, updatesTensor: MPSGraphTensor, indicesTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func gatherAlongAxis(_ axis: Int, updates updatesTensor: MPSGraphTensor, indices indicesTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 15.4+

gatherAlongAxisTensor

TypeScript
gatherAlongAxisTensor(axisTensor: MPSGraphTensor, updatesTensor: MPSGraphTensor, indicesTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func gatherAlongAxisTensor(_ axisTensor: MPSGraphTensor, updates updatesTensor: MPSGraphTensor, indices indicesTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

gatherND

TypeScript
gatherND(updatesTensor: MPSGraphTensor, indicesTensor: MPSGraphTensor, batchDimensions: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func gatherND(withUpdatesTensor updatesTensor: MPSGraphTensor, indicesTensor: MPSGraphTensor, batchDimensions: Int, name: String?) -> MPSGraphTensor
method · iOS 14.0+

gather

TypeScript
gather(updatesTensor: MPSGraphTensor, indicesTensor: MPSGraphTensor, axis: number, batchDimensions: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func gather(withUpdatesTensor updatesTensor: MPSGraphTensor, indicesTensor: MPSGraphTensor, axis: Int, batchDimensions: Int, name: String?) -> MPSGraphTensor
method · iOS 14.0+

gradients

TypeScript
gradients(primaryTensor: MPSGraphTensor, tensors: Array<MPSGraphTensor>, name?: (string) | null): NativeMap<MPSGraphTensor, MPSGraphTensor>
Swift declaration
func gradients(of primaryTensor: MPSGraphTensor, with tensors: [MPSGraphTensor], name: String?) -> [MPSGraphTensor : MPSGraphTensor]
method · iOS 14.0+

greaterThanOrEqualTo

TypeScript
greaterThanOrEqualTo(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func greaterThanOrEqualTo(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

greaterThan

TypeScript
greaterThan(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func greaterThan(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

identity

TypeScript
identity(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func identity(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

imToCol

TypeScript
imToCol(source: MPSGraphTensor, descriptor: MPSGraphImToColOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func imToCol(_ source: MPSGraphTensor, descriptor: MPSGraphImToColOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 17.0+

imaginaryPartOfTensor

TypeScript
imaginaryPartOfTensor(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func imaginaryPartOfTensor(tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
init · iOS 14.0+

init

TypeScript
static init(): MPSGraph
Swift declaration
init()
method · iOS 16.1+

inverse

TypeScript
inverse(inputTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func inverse(input inputTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

isFinite

TypeScript
isFinite(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func isFinite(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

isInfinite

TypeScript
isInfinite(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func isInfinite(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

isNaN

TypeScript
isNaN(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func isNaN(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 15.0+

leakyReLUGradient

TypeScript
leakyReLUGradient(gradient: MPSGraphTensor, source: MPSGraphTensor, alphaTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func leakyReLUGradient(withIncomingGradient gradient: MPSGraphTensor, sourceTensor source: MPSGraphTensor, alphaTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 15.0+

leakyReLU

TypeScript
leakyReLUWithAlphaName(tensor: MPSGraphTensor, alpha: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func leakyReLU(with tensor: MPSGraphTensor, alpha: Double, name: String?) -> MPSGraphTensor
method · iOS 15.0+

leakyReLU

TypeScript
leakyReLUWithAlphaTensorName(tensor: MPSGraphTensor, alphaTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func leakyReLU(with tensor: MPSGraphTensor, alphaTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

lessThanOrEqualTo

TypeScript
lessThanOrEqualTo(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func lessThanOrEqualTo(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

lessThan

TypeScript
lessThan(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func lessThan(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

logarithmBase10

TypeScript
logarithmBase10(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func logarithmBase10(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

logarithmBase2

TypeScript
logarithmBase2(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func logarithmBase2(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

logarithm

TypeScript
logarithm(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func logarithm(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

logicalAND

TypeScript
logicalAND(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func logicalAND(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

logicalNAND

TypeScript
logicalNAND(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func logicalNAND(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

logicalNOR

TypeScript
logicalNOR(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func logicalNOR(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

logicalOR

TypeScript
logicalOR(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func logicalOR(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

logicalXNOR

TypeScript
logicalXNOR(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func logicalXNOR(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

logicalXOR

TypeScript
logicalXOR(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func logicalXOR(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

matrixMultiplication

TypeScript
matrixMultiplication(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func matrixMultiplication(primary primaryTensor: MPSGraphTensor, secondary secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 16.0+

maxPooling2DGradient

TypeScript
maxPooling2DGradientWithGradientTensorIndicesTensorOutputShapeDescriptorName(gradient: MPSGraphTensor, indices: MPSGraphTensor, outputShape: Array<_Foundation_NSNumber>, descriptor: MPSGraphPooling2DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func maxPooling2DGradient(withGradientTensor gradient: MPSGraphTensor, indicesTensor indices: MPSGraphTensor, outputShape: [NSNumber], descriptor: MPSGraphPooling2DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 16.0+

maxPooling2DGradient

TypeScript
maxPooling2DGradientWithGradientTensorIndicesTensorOutputShapeTensorDescriptorName(gradient: MPSGraphTensor, indices: MPSGraphTensor, outputShape: MPSGraphTensor, descriptor: MPSGraphPooling2DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func maxPooling2DGradient(withGradientTensor gradient: MPSGraphTensor, indicesTensor indices: MPSGraphTensor, outputShapeTensor outputShape: MPSGraphTensor, descriptor: MPSGraphPooling2DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

maxPooling2DGradient

TypeScript
maxPooling2DGradientWithGradientTensorSourceTensorDescriptorName(gradient: MPSGraphTensor, source: MPSGraphTensor, descriptor: MPSGraphPooling2DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func maxPooling2DGradient(withGradientTensor gradient: MPSGraphTensor, sourceTensor source: MPSGraphTensor, descriptor: MPSGraphPooling2DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 15.3+

maxPooling2DReturnIndices

TypeScript
maxPooling2DReturnIndices(source: MPSGraphTensor, descriptor: MPSGraphPooling2DOpDescriptor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func maxPooling2DReturnIndices(_ source: MPSGraphTensor, descriptor: MPSGraphPooling2DOpDescriptor, name: String?) -> [MPSGraphTensor]
method · iOS 14.0+

maxPooling2D

TypeScript
maxPooling2D(source: MPSGraphTensor, descriptor: MPSGraphPooling2DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func maxPooling2D(withSourceTensor source: MPSGraphTensor, descriptor: MPSGraphPooling2DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 16.0+

maxPooling4DGradient

TypeScript
maxPooling4DGradientWithGradientTensorIndicesTensorOutputShapeDescriptorName(gradient: MPSGraphTensor, indices: MPSGraphTensor, outputShape: Array<_Foundation_NSNumber>, descriptor: MPSGraphPooling4DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func maxPooling4DGradient(withGradientTensor gradient: MPSGraphTensor, indicesTensor indices: MPSGraphTensor, outputShape: [NSNumber], descriptor: MPSGraphPooling4DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 16.0+

maxPooling4DGradient

TypeScript
maxPooling4DGradientWithGradientTensorIndicesTensorOutputShapeTensorDescriptorName(gradient: MPSGraphTensor, indices: MPSGraphTensor, outputShape: MPSGraphTensor, descriptor: MPSGraphPooling4DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func maxPooling4DGradient(withGradientTensor gradient: MPSGraphTensor, indicesTensor indices: MPSGraphTensor, outputShapeTensor outputShape: MPSGraphTensor, descriptor: MPSGraphPooling4DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 15.0+

maxPooling4DGradient

TypeScript
maxPooling4DGradientSourceDescriptorName(gradient: MPSGraphTensor, source: MPSGraphTensor, descriptor: MPSGraphPooling4DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func maxPooling4DGradient(_ gradient: MPSGraphTensor, source: MPSGraphTensor, descriptor: MPSGraphPooling4DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 15.3+

maxPooling4DReturnIndices

TypeScript
maxPooling4DReturnIndices(source: MPSGraphTensor, descriptor: MPSGraphPooling4DOpDescriptor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func maxPooling4DReturnIndices(_ source: MPSGraphTensor, descriptor: MPSGraphPooling4DOpDescriptor, name: String?) -> [MPSGraphTensor]
method · iOS 15.0+

maxPooling4D

TypeScript
maxPooling4D(source: MPSGraphTensor, descriptor: MPSGraphPooling4DOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func maxPooling4D(_ source: MPSGraphTensor, descriptor: MPSGraphPooling4DOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 15.0+

maximumWithNaNPropagation

TypeScript
maximumWithNaNPropagation(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func maximumWithNaNPropagation(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

maximum

TypeScript
maximum(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func maximum(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

mean

TypeScript
mean(tensor: MPSGraphTensor, axes: Array<_Foundation_NSNumber>, name?: (string) | null): MPSGraphTensor
Swift declaration
func mean(of tensor: MPSGraphTensor, axes: [NSNumber], name: String?) -> MPSGraphTensor
method · iOS 15.0+

minimumWithNaNPropagation

TypeScript
minimumWithNaNPropagation(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func minimumWithNaNPropagation(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

minimum

TypeScript
minimum(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func minimum(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

modulo

TypeScript
modulo(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func modulo(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

multiplication

TypeScript
multiplication(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func multiplication(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

negative

TypeScript
negative(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func negative(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 17.0+

nonMaximumSuppression

TypeScript
nonMaximumSuppressionWithBoxesTensorScoresTensorIouThresholdScoreThresholdPerClassSuppressionCoordinateModeName(boxesTensor: MPSGraphTensor, scoresTensor: MPSGraphTensor, IOUThreshold: number, scoreThreshold: number, perClassSuppression: boolean, coordinateMode: MPSGraphNonMaximumSuppressionCoordinateMode, name?: (string) | null): MPSGraphTensor
Swift declaration
func nonMaximumSuppression(withBoxesTensor boxesTensor: MPSGraphTensor, scoresTensor: MPSGraphTensor, iouThreshold IOUThreshold: Float, scoreThreshold: Float, perClassSuppression: Bool, coordinateMode: MPSGraphNonMaximumSuppressionCoordinateMode, name: String?) -> MPSGraphTensor
method · iOS 17.0+

nonMaximumSuppression

TypeScript
nonMaximumSuppressionWithBoxesTensorScoresTensorClassIndicesTensorIouThresholdScoreThresholdPerClassSuppressionCoordinateModeName(boxesTensor: MPSGraphTensor, scoresTensor: MPSGraphTensor, classIndicesTensor: MPSGraphTensor, IOUThreshold: number, scoreThreshold: number, perClassSuppression: boolean, coordinateMode: MPSGraphNonMaximumSuppressionCoordinateMode, name?: (string) | null): MPSGraphTensor
Swift declaration
func nonMaximumSuppression(withBoxesTensor boxesTensor: MPSGraphTensor, scoresTensor: MPSGraphTensor, classIndicesTensor: MPSGraphTensor, iouThreshold IOUThreshold: Float, scoreThreshold: Float, perClassSuppression: Bool, coordinateMode: MPSGraphNonMaximumSuppressionCoordinateMode, name: String?) -> MPSGraphTensor
method · iOS 17.0+

nonZeroIndices

TypeScript
nonZeroIndices(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func nonZeroIndices(_ tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

normalizationBetaGradient

TypeScript
normalizationBetaGradient(incomingGradientTensor: MPSGraphTensor, sourceTensor: MPSGraphTensor, axes: Array<_Foundation_NSNumber>, name?: (string) | null): MPSGraphTensor
Swift declaration
func normalizationBetaGradient(withIncomingGradientTensor incomingGradientTensor: MPSGraphTensor, sourceTensor: MPSGraphTensor, reductionAxes axes: [NSNumber], name: String?) -> MPSGraphTensor
method · iOS 14.0+

normalizationGammaGradient

TypeScript
normalizationGammaGradient(incomingGradientTensor: MPSGraphTensor, sourceTensor: MPSGraphTensor, meanTensor: MPSGraphTensor, varianceTensor: MPSGraphTensor, axes: Array<_Foundation_NSNumber>, epsilon: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func normalizationGammaGradient(withIncomingGradientTensor incomingGradientTensor: MPSGraphTensor, sourceTensor: MPSGraphTensor, mean meanTensor: MPSGraphTensor, varianceTensor: MPSGraphTensor, reductionAxes axes: [NSNumber], epsilon: Float, name: String?) -> MPSGraphTensor
method · iOS 14.0+

normalizationGradient

TypeScript
normalizationGradient(incomingGradientTensor: MPSGraphTensor, sourceTensor: MPSGraphTensor, meanTensor: MPSGraphTensor, varianceTensor: MPSGraphTensor, gamma: (MPSGraphTensor) | null, gammaGradient: (MPSGraphTensor) | null, betaGradient: (MPSGraphTensor) | null, axes: Array<_Foundation_NSNumber>, epsilon: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func normalizationGradient(withIncomingGradientTensor incomingGradientTensor: MPSGraphTensor, sourceTensor: MPSGraphTensor, mean meanTensor: MPSGraphTensor, varianceTensor: MPSGraphTensor, gammaTensor gamma: MPSGraphTensor?, gammaGradientTensor gammaGradient: MPSGraphTensor?, betaGradientTensor betaGradient: MPSGraphTensor?, reductionAxes axes: [NSNumber], epsilon: Float, name: String?) -> MPSGraphTensor
method · iOS 14.0+

normalize

TypeScript
normalize(tensor: MPSGraphTensor, mean: MPSGraphTensor, variance: MPSGraphTensor, gamma: (MPSGraphTensor) | null, beta: (MPSGraphTensor) | null, epsilon: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func normalize(_ tensor: MPSGraphTensor, mean: MPSGraphTensor, variance: MPSGraphTensor, gamma: MPSGraphTensor?, beta: MPSGraphTensor?, epsilon: Float, name: String?) -> MPSGraphTensor
method · iOS 14.0+

notEqual

TypeScript
notEqual(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func notEqual(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

not

TypeScript
not(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func not(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

oneHot

TypeScript
oneHotWithIndicesTensorDepthAxisDataTypeName(indicesTensor: MPSGraphTensor, depth: number, axis: number, dataType: _MetalPerformanceShaders_MPSDataType, name?: (string) | null): MPSGraphTensor
Swift declaration
func oneHot(withIndicesTensor indicesTensor: MPSGraphTensor, depth: Int, axis: Int, dataType: MPSDataType, name: String?) -> MPSGraphTensor
method · iOS 14.0+

oneHot

TypeScript
oneHotWithIndicesTensorDepthAxisDataTypeOnValueOffValueName(indicesTensor: MPSGraphTensor, depth: number, axis: number, dataType: _MetalPerformanceShaders_MPSDataType, onValue: number, offValue: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func oneHot(withIndicesTensor indicesTensor: MPSGraphTensor, depth: Int, axis: Int, dataType: MPSDataType, onValue: Double, offValue: Double, name: String?) -> MPSGraphTensor
method · iOS 14.0+

oneHot

TypeScript
oneHotWithIndicesTensorDepthAxisName(indicesTensor: MPSGraphTensor, depth: number, axis: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func oneHot(withIndicesTensor indicesTensor: MPSGraphTensor, depth: Int, axis: Int, name: String?) -> MPSGraphTensor
method · iOS 14.0+

oneHot

TypeScript
oneHotWithIndicesTensorDepthDataTypeName(indicesTensor: MPSGraphTensor, depth: number, dataType: _MetalPerformanceShaders_MPSDataType, name?: (string) | null): MPSGraphTensor
Swift declaration
func oneHot(withIndicesTensor indicesTensor: MPSGraphTensor, depth: Int, dataType: MPSDataType, name: String?) -> MPSGraphTensor
method · iOS 14.0+

oneHot

TypeScript
oneHotWithIndicesTensorDepthDataTypeOnValueOffValueName(indicesTensor: MPSGraphTensor, depth: number, dataType: _MetalPerformanceShaders_MPSDataType, onValue: number, offValue: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func oneHot(withIndicesTensor indicesTensor: MPSGraphTensor, depth: Int, dataType: MPSDataType, onValue: Double, offValue: Double, name: String?) -> MPSGraphTensor
method · iOS 14.0+

oneHot

TypeScript
oneHotWithIndicesTensorDepthName(indicesTensor: MPSGraphTensor, depth: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func oneHot(withIndicesTensor indicesTensor: MPSGraphTensor, depth: Int, name: String?) -> MPSGraphTensor
method · iOS 14.0+

padGradient

TypeScript
padGradient(incomingGradientTensor: MPSGraphTensor, sourceTensor: MPSGraphTensor, paddingMode: MPSGraphPaddingMode, leftPadding: Array<_Foundation_NSNumber>, rightPadding: Array<_Foundation_NSNumber>, name?: (string) | null): MPSGraphTensor
Swift declaration
func padGradient(withIncomingGradientTensor incomingGradientTensor: MPSGraphTensor, sourceTensor: MPSGraphTensor, paddingMode: MPSGraphPaddingMode, leftPadding: [NSNumber], rightPadding: [NSNumber], name: String?) -> MPSGraphTensor
method · iOS 14.0+

padTensor

TypeScript
padTensor(tensor: MPSGraphTensor, paddingMode: MPSGraphPaddingMode, leftPadding: Array<_Foundation_NSNumber>, rightPadding: Array<_Foundation_NSNumber>, constantValue: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func padTensor(_ tensor: MPSGraphTensor, with paddingMode: MPSGraphPaddingMode, leftPadding: [NSNumber], rightPadding: [NSNumber], constantValue: Double, name: String?) -> MPSGraphTensor
method · iOS 14.0+

placeholder

TypeScript
placeholderShapeDataTypeName(shape: (Array<_Foundation_NSNumber>) | null, dataType: _MetalPerformanceShaders_MPSDataType, name?: (string) | null): MPSGraphTensor
Swift declaration
func placeholder(shape: [NSNumber]?, dataType: MPSDataType, name: String?) -> MPSGraphTensor
method · iOS 14.0+

placeholder

TypeScript
placeholderShapeName(shape?: (Array<_Foundation_NSNumber>) | null, name?: (string) | null): MPSGraphTensor
Swift declaration
func placeholder(shape: [NSNumber]?, name: String?) -> MPSGraphTensor
method · iOS 26.3+

planarTensor

TypeScript
planarTensor(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func planarTensor(tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

power

TypeScript
power(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func power(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 16.2+

quantize

TypeScript
quantizeScaleZeroPointDataTypeName(tensor: MPSGraphTensor, scale: number, zeroPoint: number, dataType: _MetalPerformanceShaders_MPSDataType, name?: (string) | null): MPSGraphTensor
Swift declaration
func quantize(_ tensor: MPSGraphTensor, scale: Double, zeroPoint: Double, dataType: MPSDataType, name: String?) -> MPSGraphTensor
method · iOS 16.2+

quantize

TypeScript
quantizeScaleTensorZeroPointDataTypeAxisName(tensor: MPSGraphTensor, scaleTensor: MPSGraphTensor, zeroPoint: number, dataType: _MetalPerformanceShaders_MPSDataType, axis: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func quantize(_ tensor: MPSGraphTensor, scaleTensor: MPSGraphTensor, zeroPoint: Double, dataType: MPSDataType, axis: Int, name: String?) -> MPSGraphTensor
method · iOS 16.2+

quantize

TypeScript
quantizeScaleTensorZeroPointTensorDataTypeAxisName(tensor: MPSGraphTensor, scaleTensor: MPSGraphTensor, zeroPointTensor: MPSGraphTensor, dataType: _MetalPerformanceShaders_MPSDataType, axis: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func quantize(_ tensor: MPSGraphTensor, scaleTensor: MPSGraphTensor, zeroPointTensor: MPSGraphTensor, dataType: MPSDataType, axis: Int, name: String?) -> MPSGraphTensor
method · iOS 14.0+

randomPhiloxStateTensor

TypeScript
randomPhiloxStateTensorWithCounterLowCounterHighKeyName(counterLow: number, counterHigh: number, key: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func randomPhiloxStateTensor(withCounterLow counterLow: Int, counterHigh: Int, key: Int, name: String?) -> MPSGraphTensor
method · iOS 14.0+

randomPhiloxStateTensor

TypeScript
randomPhiloxStateTensorWithSeedName(seed: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func randomPhiloxStateTensor(withSeed seed: Int, name: String?) -> MPSGraphTensor
method · iOS 14.0+

randomTensor

TypeScript
randomTensorWithShapeDescriptorName(shape: Array<_Foundation_NSNumber>, descriptor: MPSGraphRandomOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func randomTensor(withShape shape: [NSNumber], descriptor: MPSGraphRandomOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

randomTensor

TypeScript
randomTensorWithShapeDescriptorSeedName(shape: Array<_Foundation_NSNumber>, descriptor: MPSGraphRandomOpDescriptor, seed: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func randomTensor(withShape shape: [NSNumber], descriptor: MPSGraphRandomOpDescriptor, seed: Int, name: String?) -> MPSGraphTensor
method · iOS 14.0+

randomTensor

TypeScript
randomTensorWithShapeDescriptorStateTensorName(shape: Array<_Foundation_NSNumber>, descriptor: MPSGraphRandomOpDescriptor, state: MPSGraphTensor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func randomTensor(withShape shape: [NSNumber], descriptor: MPSGraphRandomOpDescriptor, stateTensor state: MPSGraphTensor, name: String?) -> [MPSGraphTensor]
method · iOS 14.0+

randomTensor

TypeScript
randomTensorWithShapeTensorDescriptorName(shapeTensor: MPSGraphTensor, descriptor: MPSGraphRandomOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func randomTensor(withShapeTensor shapeTensor: MPSGraphTensor, descriptor: MPSGraphRandomOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

randomTensor

TypeScript
randomTensorWithShapeTensorDescriptorSeedName(shapeTensor: MPSGraphTensor, descriptor: MPSGraphRandomOpDescriptor, seed: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func randomTensor(withShapeTensor shapeTensor: MPSGraphTensor, descriptor: MPSGraphRandomOpDescriptor, seed: Int, name: String?) -> MPSGraphTensor
method · iOS 14.0+

randomTensor

TypeScript
randomTensorWithShapeTensorDescriptorStateTensorName(shapeTensor: MPSGraphTensor, descriptor: MPSGraphRandomOpDescriptor, state: MPSGraphTensor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func randomTensor(withShapeTensor shapeTensor: MPSGraphTensor, descriptor: MPSGraphRandomOpDescriptor, stateTensor state: MPSGraphTensor, name: String?) -> [MPSGraphTensor]
method · iOS 14.0+

randomUniformTensor

TypeScript
randomUniformTensorWithShapeName(shape: Array<_Foundation_NSNumber>, name?: (string) | null): MPSGraphTensor
Swift declaration
func randomUniformTensor(withShape shape: [NSNumber], name: String?) -> MPSGraphTensor
method · iOS 14.0+

randomUniformTensor

TypeScript
randomUniformTensorWithShapeSeedName(shape: Array<_Foundation_NSNumber>, seed: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func randomUniformTensor(withShape shape: [NSNumber], seed: Int, name: String?) -> MPSGraphTensor
method · iOS 14.0+

randomUniformTensor

TypeScript
randomUniformTensorWithShapeStateTensorName(shape: Array<_Foundation_NSNumber>, state: MPSGraphTensor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func randomUniformTensor(withShape shape: [NSNumber], stateTensor state: MPSGraphTensor, name: String?) -> [MPSGraphTensor]
method · iOS 14.0+

randomUniformTensor

TypeScript
randomUniformTensorWithShapeTensorName(shapeTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func randomUniformTensor(withShapeTensor shapeTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

randomUniformTensor

TypeScript
randomUniformTensorWithShapeTensorSeedName(shapeTensor: MPSGraphTensor, seed: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func randomUniformTensor(withShapeTensor shapeTensor: MPSGraphTensor, seed: Int, name: String?) -> MPSGraphTensor
method · iOS 14.0+

randomUniformTensor

TypeScript
randomUniformTensorWithShapeTensorStateTensorName(shapeTensor: MPSGraphTensor, state: MPSGraphTensor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func randomUniformTensor(withShapeTensor shapeTensor: MPSGraphTensor, stateTensor state: MPSGraphTensor, name: String?) -> [MPSGraphTensor]
method · iOS 14.0+

reLUGradient

TypeScript
reLUGradient(gradient: MPSGraphTensor, source: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func reLUGradient(withIncomingGradient gradient: MPSGraphTensor, sourceTensor source: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

reLU

TypeScript
reLU(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func reLU(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

read

TypeScript
read(variable: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func read(_ variable: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 17.0+

realPartOfTensor

TypeScript
realPartOfTensor(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func realPartOfTensor(tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 17.0+

realToHermiteanFFT

TypeScript
realToHermiteanFFTAxesDescriptorName(tensor: MPSGraphTensor, axes: Array<_Foundation_NSNumber>, descriptor: MPSGraphFFTDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func realToHermiteanFFT(_ tensor: MPSGraphTensor, axes: [NSNumber], descriptor: MPSGraphFFTDescriptor, name: String?) -> MPSGraphTensor
method · iOS 17.0+

realToHermiteanFFT

TypeScript
realToHermiteanFFTAxesTensorDescriptorName(tensor: MPSGraphTensor, axesTensor: MPSGraphTensor, descriptor: MPSGraphFFTDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func realToHermiteanFFT(_ tensor: MPSGraphTensor, axesTensor: MPSGraphTensor, descriptor: MPSGraphFFTDescriptor, name: String?) -> MPSGraphTensor
method · iOS 18.0+

reciprocalSquareRoot

TypeScript
reciprocalSquareRoot(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func reciprocalSquareRoot(_ tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

reciprocal

TypeScript
reciprocal(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func reciprocal(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 15.3+

reductionAnd

TypeScript
reductionAndWithAxesName(tensor: MPSGraphTensor, axes?: (Array<_Foundation_NSNumber>) | null, name?: (string) | null): MPSGraphTensor
Swift declaration
func reductionAnd(with tensor: MPSGraphTensor, axes: [NSNumber]?, name: String?) -> MPSGraphTensor
method · iOS 15.3+

reductionAnd

TypeScript
reductionAndWithAxisName(tensor: MPSGraphTensor, axis: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func reductionAnd(with tensor: MPSGraphTensor, axis: Int, name: String?) -> MPSGraphTensor
method · iOS 15.0+

reductionArgMaximum

TypeScript
reductionArgMaximum(tensor: MPSGraphTensor, axis: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func reductionArgMaximum(with tensor: MPSGraphTensor, axis: Int, name: String?) -> MPSGraphTensor
method · iOS 15.0+

reductionArgMinimum

TypeScript
reductionArgMinimum(tensor: MPSGraphTensor, axis: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func reductionArgMinimum(with tensor: MPSGraphTensor, axis: Int, name: String?) -> MPSGraphTensor
method · iOS 14.0+

reductionMaximumPropagateNaN

TypeScript
reductionMaximumPropagateNaNWithAxesName(tensor: MPSGraphTensor, axes?: (Array<_Foundation_NSNumber>) | null, name?: (string) | null): MPSGraphTensor
Swift declaration
func reductionMaximumPropagateNaN(with tensor: MPSGraphTensor, axes: [NSNumber]?, name: String?) -> MPSGraphTensor
method · iOS 14.0+

reductionMaximumPropagateNaN

TypeScript
reductionMaximumPropagateNaNWithAxisName(tensor: MPSGraphTensor, axis: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func reductionMaximumPropagateNaN(with tensor: MPSGraphTensor, axis: Int, name: String?) -> MPSGraphTensor
method · iOS 14.0+

reductionMaximum

TypeScript
reductionMaximumWithAxesName(tensor: MPSGraphTensor, axes?: (Array<_Foundation_NSNumber>) | null, name?: (string) | null): MPSGraphTensor
Swift declaration
func reductionMaximum(with tensor: MPSGraphTensor, axes: [NSNumber]?, name: String?) -> MPSGraphTensor
method · iOS 14.0+

reductionMaximum

TypeScript
reductionMaximumWithAxisName(tensor: MPSGraphTensor, axis: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func reductionMaximum(with tensor: MPSGraphTensor, axis: Int, name: String?) -> MPSGraphTensor
method · iOS 14.0+

reductionMinimumPropagateNaN

TypeScript
reductionMinimumPropagateNaNWithAxesName(tensor: MPSGraphTensor, axes?: (Array<_Foundation_NSNumber>) | null, name?: (string) | null): MPSGraphTensor
Swift declaration
func reductionMinimumPropagateNaN(with tensor: MPSGraphTensor, axes: [NSNumber]?, name: String?) -> MPSGraphTensor
method · iOS 14.0+

reductionMinimumPropagateNaN

TypeScript
reductionMinimumPropagateNaNWithAxisName(tensor: MPSGraphTensor, axis: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func reductionMinimumPropagateNaN(with tensor: MPSGraphTensor, axis: Int, name: String?) -> MPSGraphTensor
method · iOS 14.0+

reductionMinimum

TypeScript
reductionMinimumWithAxesName(tensor: MPSGraphTensor, axes?: (Array<_Foundation_NSNumber>) | null, name?: (string) | null): MPSGraphTensor
Swift declaration
func reductionMinimum(with tensor: MPSGraphTensor, axes: [NSNumber]?, name: String?) -> MPSGraphTensor
method · iOS 14.0+

reductionMinimum

TypeScript
reductionMinimumWithAxisName(tensor: MPSGraphTensor, axis: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func reductionMinimum(with tensor: MPSGraphTensor, axis: Int, name: String?) -> MPSGraphTensor
method · iOS 15.3+

reductionOr

TypeScript
reductionOrWithAxesName(tensor: MPSGraphTensor, axes?: (Array<_Foundation_NSNumber>) | null, name?: (string) | null): MPSGraphTensor
Swift declaration
func reductionOr(with tensor: MPSGraphTensor, axes: [NSNumber]?, name: String?) -> MPSGraphTensor
method · iOS 15.3+

reductionOr

TypeScript
reductionOrWithAxisName(tensor: MPSGraphTensor, axis: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func reductionOr(with tensor: MPSGraphTensor, axis: Int, name: String?) -> MPSGraphTensor
method · iOS 14.0+

reductionProduct

TypeScript
reductionProductWithAxesName(tensor: MPSGraphTensor, axes?: (Array<_Foundation_NSNumber>) | null, name?: (string) | null): MPSGraphTensor
Swift declaration
func reductionProduct(with tensor: MPSGraphTensor, axes: [NSNumber]?, name: String?) -> MPSGraphTensor
method · iOS 14.0+

reductionProduct

TypeScript
reductionProductWithAxisName(tensor: MPSGraphTensor, axis: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func reductionProduct(with tensor: MPSGraphTensor, axis: Int, name: String?) -> MPSGraphTensor
method · iOS 14.0+

reductionSum

TypeScript
reductionSumWithAxesName(tensor: MPSGraphTensor, axes?: (Array<_Foundation_NSNumber>) | null, name?: (string) | null): MPSGraphTensor
Swift declaration
func reductionSum(with tensor: MPSGraphTensor, axes: [NSNumber]?, name: String?) -> MPSGraphTensor
method · iOS 14.0+

reductionSum

TypeScript
reductionSumWithAxisName(tensor: MPSGraphTensor, axis: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func reductionSum(with tensor: MPSGraphTensor, axis: Int, name: String?) -> MPSGraphTensor
method · iOS 16.3+

reinterpretCast

TypeScript
reinterpretCast(tensor: MPSGraphTensor, type: _MetalPerformanceShaders_MPSDataType, name?: (string) | null): MPSGraphTensor
Swift declaration
func reinterpretCast(_ tensor: MPSGraphTensor, to type: MPSDataType, name: String?) -> MPSGraphTensor
method · iOS 14.0+

reshape

TypeScript
reshapeShapeName(tensor: MPSGraphTensor, shape: Array<_Foundation_NSNumber>, name?: (string) | null): MPSGraphTensor
Swift declaration
func reshape(_ tensor: MPSGraphTensor, shape: [NSNumber], name: String?) -> MPSGraphTensor
method · iOS 15.0+

reshape

TypeScript
reshapeShapeTensorName(tensor: MPSGraphTensor, shapeTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func reshape(_ tensor: MPSGraphTensor, shapeTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 16.0+

resizeBilinear

TypeScript
resizeBilinearWithGradientTensorInputCenterResultAlignCornersLayoutName(gradient: MPSGraphTensor, input: MPSGraphTensor, centerResult: boolean, alignCorners: boolean, layout: MPSGraphTensorNamedDataLayout, name?: (string) | null): MPSGraphTensor
Swift declaration
func resizeBilinear(withGradientTensor gradient: MPSGraphTensor, input: MPSGraphTensor, centerResult: Bool, alignCorners: Bool, layout: MPSGraphTensorNamedDataLayout, name: String?) -> MPSGraphTensor
method · iOS 16.0+

resizeBilinear

TypeScript
resizeBilinearWithGradientTensorInputScaleOffsetTensorLayoutName(gradient: MPSGraphTensor, input: MPSGraphTensor, scaleOffset: MPSGraphTensor, layout: MPSGraphTensorNamedDataLayout, name?: (string) | null): MPSGraphTensor
Swift declaration
func resizeBilinear(withGradientTensor gradient: MPSGraphTensor, input: MPSGraphTensor, scaleOffsetTensor scaleOffset: MPSGraphTensor, layout: MPSGraphTensorNamedDataLayout, name: String?) -> MPSGraphTensor
method · iOS 17.0+

resizeBilinear

TypeScript
resizeBilinearWithGradientTensorInputScaleOffsetTensorName(gradient: MPSGraphTensor, input: MPSGraphTensor, scale: MPSGraphTensor, offset: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func resizeBilinear(withGradientTensor gradient: MPSGraphTensor, input: MPSGraphTensor, scale: MPSGraphTensor, offsetTensor offset: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 16.0+

resizeBilinear

TypeScript
resizeBilinearSizeTensorCenterResultAlignCornersLayoutName(imagesTensor: MPSGraphTensor, size: MPSGraphTensor, centerResult: boolean, alignCorners: boolean, layout: MPSGraphTensorNamedDataLayout, name?: (string) | null): MPSGraphTensor
Swift declaration
func resizeBilinear(_ imagesTensor: MPSGraphTensor, sizeTensor size: MPSGraphTensor, centerResult: Bool, alignCorners: Bool, layout: MPSGraphTensorNamedDataLayout, name: String?) -> MPSGraphTensor
method · iOS 17.0+

resizeBilinear

TypeScript
resizeBilinearSizeTensorCenterResultAlignCornersName(imagesTensor: MPSGraphTensor, size: MPSGraphTensor, centerResult: boolean, alignCorners: boolean, name?: (string) | null): MPSGraphTensor
Swift declaration
func resizeBilinear(_ imagesTensor: MPSGraphTensor, sizeTensor size: MPSGraphTensor, centerResult: Bool, alignCorners: Bool, name: String?) -> MPSGraphTensor
method · iOS 16.0+

resizeBilinear

TypeScript
resizeBilinearSizeTensorScaleOffsetTensorLayoutName(imagesTensor: MPSGraphTensor, size: MPSGraphTensor, scaleOffset: MPSGraphTensor, layout: MPSGraphTensorNamedDataLayout, name?: (string) | null): MPSGraphTensor
Swift declaration
func resizeBilinear(_ imagesTensor: MPSGraphTensor, sizeTensor size: MPSGraphTensor, scaleOffsetTensor scaleOffset: MPSGraphTensor, layout: MPSGraphTensorNamedDataLayout, name: String?) -> MPSGraphTensor
method · iOS 17.0+

resizeBilinear

TypeScript
resizeBilinearSizeTensorScaleTensorOffsetTensorName(imagesTensor: MPSGraphTensor, size: MPSGraphTensor, scale: MPSGraphTensor, offset: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func resizeBilinear(_ imagesTensor: MPSGraphTensor, sizeTensor size: MPSGraphTensor, scaleTensor scale: MPSGraphTensor, offsetTensor offset: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 16.0+

resizeNearest

TypeScript
resizeNearestWithGradientTensorInputNearestRoundingModeCenterResultAlignCornersLayoutName(gradient: MPSGraphTensor, input: MPSGraphTensor, nearestRoundingMode: MPSGraphResizeNearestRoundingMode, centerResult: boolean, alignCorners: boolean, layout: MPSGraphTensorNamedDataLayout, name?: (string) | null): MPSGraphTensor
Swift declaration
func resizeNearest(withGradientTensor gradient: MPSGraphTensor, input: MPSGraphTensor, nearestRoundingMode: MPSGraphResizeNearestRoundingMode, centerResult: Bool, alignCorners: Bool, layout: MPSGraphTensorNamedDataLayout, name: String?) -> MPSGraphTensor
method · iOS 16.0+

resizeNearest

TypeScript
resizeNearestWithGradientTensorInputScaleOffsetTensorNearestRoundingModeLayoutName(gradient: MPSGraphTensor, input: MPSGraphTensor, scaleOffset: MPSGraphTensor, nearestRoundingMode: MPSGraphResizeNearestRoundingMode, layout: MPSGraphTensorNamedDataLayout, name?: (string) | null): MPSGraphTensor
Swift declaration
func resizeNearest(withGradientTensor gradient: MPSGraphTensor, input: MPSGraphTensor, scaleOffsetTensor scaleOffset: MPSGraphTensor, nearestRoundingMode: MPSGraphResizeNearestRoundingMode, layout: MPSGraphTensorNamedDataLayout, name: String?) -> MPSGraphTensor
method · iOS 17.0+

resizeNearest

TypeScript
resizeNearestWithGradientTensorInputScaleOffsetTensorNearestRoundingModeName(gradient: MPSGraphTensor, input: MPSGraphTensor, scale: MPSGraphTensor, offset: MPSGraphTensor, nearestRoundingMode: MPSGraphResizeNearestRoundingMode, name?: (string) | null): MPSGraphTensor
Swift declaration
func resizeNearest(withGradientTensor gradient: MPSGraphTensor, input: MPSGraphTensor, scale: MPSGraphTensor, offsetTensor offset: MPSGraphTensor, nearestRoundingMode: MPSGraphResizeNearestRoundingMode, name: String?) -> MPSGraphTensor
method · iOS 16.0+

resizeNearest

TypeScript
resizeNearestSizeTensorNearestRoundingModeCenterResultAlignCornersLayoutName(imagesTensor: MPSGraphTensor, size: MPSGraphTensor, nearestRoundingMode: MPSGraphResizeNearestRoundingMode, centerResult: boolean, alignCorners: boolean, layout: MPSGraphTensorNamedDataLayout, name?: (string) | null): MPSGraphTensor
Swift declaration
func resizeNearest(_ imagesTensor: MPSGraphTensor, sizeTensor size: MPSGraphTensor, nearestRoundingMode: MPSGraphResizeNearestRoundingMode, centerResult: Bool, alignCorners: Bool, layout: MPSGraphTensorNamedDataLayout, name: String?) -> MPSGraphTensor
method · iOS 17.0+

resizeNearest

TypeScript
resizeNearestSizeTensorNearestRoundingModeCenterResultAlignCornersName(imagesTensor: MPSGraphTensor, size: MPSGraphTensor, nearestRoundingMode: MPSGraphResizeNearestRoundingMode, centerResult: boolean, alignCorners: boolean, name?: (string) | null): MPSGraphTensor
Swift declaration
func resizeNearest(_ imagesTensor: MPSGraphTensor, sizeTensor size: MPSGraphTensor, nearestRoundingMode: MPSGraphResizeNearestRoundingMode, centerResult: Bool, alignCorners: Bool, name: String?) -> MPSGraphTensor
method · iOS 16.0+

resizeNearest

TypeScript
resizeNearestSizeTensorScaleOffsetTensorNearestRoundingModeLayoutName(imagesTensor: MPSGraphTensor, size: MPSGraphTensor, scaleOffset: MPSGraphTensor, nearestRoundingMode: MPSGraphResizeNearestRoundingMode, layout: MPSGraphTensorNamedDataLayout, name?: (string) | null): MPSGraphTensor
Swift declaration
func resizeNearest(_ imagesTensor: MPSGraphTensor, sizeTensor size: MPSGraphTensor, scaleOffsetTensor scaleOffset: MPSGraphTensor, nearestRoundingMode: MPSGraphResizeNearestRoundingMode, layout: MPSGraphTensorNamedDataLayout, name: String?) -> MPSGraphTensor
method · iOS 17.0+

resizeNearest

TypeScript
resizeNearestSizeTensorScaleTensorOffsetTensorNearestRoundingModeName(imagesTensor: MPSGraphTensor, size: MPSGraphTensor, scale: MPSGraphTensor, offset: MPSGraphTensor, nearestRoundingMode: MPSGraphResizeNearestRoundingMode, name?: (string) | null): MPSGraphTensor
Swift declaration
func resizeNearest(_ imagesTensor: MPSGraphTensor, sizeTensor size: MPSGraphTensor, scaleTensor scale: MPSGraphTensor, offsetTensor offset: MPSGraphTensor, nearestRoundingMode: MPSGraphResizeNearestRoundingMode, name: String?) -> MPSGraphTensor
method · iOS 14.0+

resize

TypeScript
resizeSizeModeCenterResultAlignCornersLayoutName(imagesTensor: MPSGraphTensor, size: Array<_Foundation_NSNumber>, mode: MPSGraphResizeMode, centerResult: boolean, alignCorners: boolean, layout: MPSGraphTensorNamedDataLayout, name?: (string) | null): MPSGraphTensor
Swift declaration
func resize(_ imagesTensor: MPSGraphTensor, size: [NSNumber], mode: MPSGraphResizeMode, centerResult: Bool, alignCorners: Bool, layout: MPSGraphTensorNamedDataLayout, name: String?) -> MPSGraphTensor
method · iOS 15.0+

resize

TypeScript
resizeSizeTensorModeCenterResultAlignCornersLayoutName(imagesTensor: MPSGraphTensor, size: MPSGraphTensor, mode: MPSGraphResizeMode, centerResult: boolean, alignCorners: boolean, layout: MPSGraphTensorNamedDataLayout, name?: (string) | null): MPSGraphTensor
Swift declaration
func resize(_ imagesTensor: MPSGraphTensor, sizeTensor size: MPSGraphTensor, mode: MPSGraphResizeMode, centerResult: Bool, alignCorners: Bool, layout: MPSGraphTensorNamedDataLayout, name: String?) -> MPSGraphTensor
method · iOS 17.0+

resize

TypeScript
resizeSizeTensorModeCenterResultAlignCornersName(imagesTensor: MPSGraphTensor, size: MPSGraphTensor, mode: MPSGraphResizeMode, centerResult: boolean, alignCorners: boolean, name?: (string) | null): MPSGraphTensor
Swift declaration
func resize(_ imagesTensor: MPSGraphTensor, sizeTensor size: MPSGraphTensor, mode: MPSGraphResizeMode, centerResult: Bool, alignCorners: Bool, name: String?) -> MPSGraphTensor
method · iOS 16.0+

resize

TypeScript
resizeSizeTensorScaleOffsetTensorModeLayoutName(imagesTensor: MPSGraphTensor, size: MPSGraphTensor, scaleOffset: MPSGraphTensor, mode: MPSGraphResizeMode, layout: MPSGraphTensorNamedDataLayout, name?: (string) | null): MPSGraphTensor
Swift declaration
func resize(_ imagesTensor: MPSGraphTensor, sizeTensor size: MPSGraphTensor, scaleOffsetTensor scaleOffset: MPSGraphTensor, mode: MPSGraphResizeMode, layout: MPSGraphTensorNamedDataLayout, name: String?) -> MPSGraphTensor
method · iOS 17.0+

resize

TypeScript
resizeSizeTensorScaleTensorOffsetTenorModeName(imagesTensor: MPSGraphTensor, size: MPSGraphTensor, scale: MPSGraphTensor, offset: MPSGraphTensor, mode: MPSGraphResizeMode, name?: (string) | null): MPSGraphTensor
Swift declaration
func resize(_ imagesTensor: MPSGraphTensor, sizeTensor size: MPSGraphTensor, scaleTensor scale: MPSGraphTensor, offsetTenor offset: MPSGraphTensor, mode: MPSGraphResizeMode, name: String?) -> MPSGraphTensor
method · iOS 14.0+

resize

TypeScript
resizeWithGradientTensorInputModeCenterResultAlignCornersLayoutName(gradient: MPSGraphTensor, input: MPSGraphTensor, mode: MPSGraphResizeMode, centerResult: boolean, alignCorners: boolean, layout: MPSGraphTensorNamedDataLayout, name?: (string) | null): MPSGraphTensor
Swift declaration
func resize(withGradientTensor gradient: MPSGraphTensor, input: MPSGraphTensor, mode: MPSGraphResizeMode, centerResult: Bool, alignCorners: Bool, layout: MPSGraphTensorNamedDataLayout, name: String?) -> MPSGraphTensor
method · iOS 16.0+

resize

TypeScript
resizeWithGradientTensorInputScaleOffsetTensorModeLayoutName(gradient: MPSGraphTensor, input: MPSGraphTensor, scaleOffset: MPSGraphTensor, mode: MPSGraphResizeMode, layout: MPSGraphTensorNamedDataLayout, name?: (string) | null): MPSGraphTensor
Swift declaration
func resize(withGradientTensor gradient: MPSGraphTensor, input: MPSGraphTensor, scaleOffsetTensor scaleOffset: MPSGraphTensor, mode: MPSGraphResizeMode, layout: MPSGraphTensorNamedDataLayout, name: String?) -> MPSGraphTensor
method · iOS 17.0+

resize

TypeScript
resizeWithGradientTensorInputScaleOffsetTensorModeName(gradient: MPSGraphTensor, input: MPSGraphTensor, scale: MPSGraphTensor, offset: MPSGraphTensor, mode: MPSGraphResizeMode, name?: (string) | null): MPSGraphTensor
Swift declaration
func resize(withGradientTensor gradient: MPSGraphTensor, input: MPSGraphTensor, scale: MPSGraphTensor, offsetTensor offset: MPSGraphTensor, mode: MPSGraphResizeMode, name: String?) -> MPSGraphTensor
method · iOS 14.0+ · Deprecated in iOS 18.0

reverseSquareRoot

TypeScript
reverseSquareRoot(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func reverseSquareRoot(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 15.0+

reverse

TypeScript
reverseAxesName(tensor: MPSGraphTensor, axes: Array<_Foundation_NSNumber>, name?: (string) | null): MPSGraphTensor
Swift declaration
func reverse(_ tensor: MPSGraphTensor, axes: [NSNumber], name: String?) -> MPSGraphTensor
method · iOS 15.0+

reverse

TypeScript
reverseAxesTensorName(tensor: MPSGraphTensor, axesTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func reverse(_ tensor: MPSGraphTensor, axesTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 15.0+

reverse

TypeScript
reverseName(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func reverse(_ tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

rint

TypeScript
rint(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func rint(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

round

TypeScript
round(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func round(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

runAsync

TypeScript
runAsyncFeedsTargetTensorsTargetOperationsExecutionDescriptor(feeds: NativeMap<MPSGraphTensor, MPSGraphTensorData>, targetTensors: Array<MPSGraphTensor>, targetOperations?: (Array<MPSGraphOperation>) | null, executionDescriptor?: (MPSGraphExecutionDescriptor) | null): NativeMap<MPSGraphTensor, MPSGraphTensorData>
Swift declaration
func runAsync(feeds: [MPSGraphTensor : MPSGraphTensorData], targetTensors: [MPSGraphTensor], targetOperations: [MPSGraphOperation]?, executionDescriptor: MPSGraphExecutionDescriptor?) -> [MPSGraphTensor : MPSGraphTensorData]
method · iOS 14.0+

runAsync

TypeScript
runAsyncWithFeedsTargetOperationsResultsDictionaryExecutionDescriptor(commandQueue: SDKHandle, feeds: NativeMap<MPSGraphTensor, MPSGraphTensorData>, targetOperations: (Array<MPSGraphOperation>) | null, resultsDictionary: NativeMap<MPSGraphTensor, MPSGraphTensorData>, executionDescriptor?: (MPSGraphExecutionDescriptor) | null): void
Swift declaration
func runAsync(with commandQueue: any MTLCommandQueue, feeds: [MPSGraphTensor : MPSGraphTensorData], targetOperations: [MPSGraphOperation]?, resultsDictionary: [MPSGraphTensor : MPSGraphTensorData], executionDescriptor: MPSGraphExecutionDescriptor?)
method · iOS 14.0+

runAsync

TypeScript
runAsyncWithFeedsTargetTensorsTargetOperationsExecutionDescriptor(commandQueue: SDKHandle, feeds: NativeMap<MPSGraphTensor, MPSGraphTensorData>, targetTensors: Array<MPSGraphTensor>, targetOperations?: (Array<MPSGraphOperation>) | null, executionDescriptor?: (MPSGraphExecutionDescriptor) | null): NativeMap<MPSGraphTensor, MPSGraphTensorData>
Swift declaration
func runAsync(with commandQueue: any MTLCommandQueue, feeds: [MPSGraphTensor : MPSGraphTensorData], targetTensors: [MPSGraphTensor], targetOperations: [MPSGraphOperation]?, executionDescriptor: MPSGraphExecutionDescriptor?) -> [MPSGraphTensor : MPSGraphTensorData]
method · iOS 14.0+

run

TypeScript
runFeedsTargetTensorsTargetOperations(feeds: NativeMap<MPSGraphTensor, MPSGraphTensorData>, targetTensors: Array<MPSGraphTensor>, targetOperations?: (Array<MPSGraphOperation>) | null): NativeMap<MPSGraphTensor, MPSGraphTensorData>
Swift declaration
func run(feeds: [MPSGraphTensor : MPSGraphTensorData], targetTensors: [MPSGraphTensor], targetOperations: [MPSGraphOperation]?) -> [MPSGraphTensor : MPSGraphTensorData]
method · iOS 14.0+

run

TypeScript
runWithFeedsTargetOperationsResultsDictionary(commandQueue: SDKHandle, feeds: NativeMap<MPSGraphTensor, MPSGraphTensorData>, targetOperations: (Array<MPSGraphOperation>) | null, resultsDictionary: NativeMap<MPSGraphTensor, MPSGraphTensorData>): void
Swift declaration
func run(with commandQueue: any MTLCommandQueue, feeds: [MPSGraphTensor : MPSGraphTensorData], targetOperations: [MPSGraphOperation]?, resultsDictionary: [MPSGraphTensor : MPSGraphTensorData])
method · iOS 14.0+

run

TypeScript
runWithFeedsTargetTensorsTargetOperations(commandQueue: SDKHandle, feeds: NativeMap<MPSGraphTensor, MPSGraphTensorData>, targetTensors: Array<MPSGraphTensor>, targetOperations?: (Array<MPSGraphOperation>) | null): NativeMap<MPSGraphTensor, MPSGraphTensorData>
Swift declaration
func run(with commandQueue: any MTLCommandQueue, feeds: [MPSGraphTensor : MPSGraphTensorData], targetTensors: [MPSGraphTensor], targetOperations: [MPSGraphOperation]?) -> [MPSGraphTensor : MPSGraphTensorData]
method · iOS 16.2+

sampleGrid

TypeScript
sampleGridWithSourceTensorCoordinateTensorLayoutNormalizeCoordinatesRelativeCoordinatesAlignCornersPaddingModeNearestRoundingModeConstantValueName(source: MPSGraphTensor, coordinates: MPSGraphTensor, layout: MPSGraphTensorNamedDataLayout, normalizeCoordinates: boolean, relativeCoordinates: boolean, alignCorners: boolean, paddingMode: MPSGraphPaddingMode, nearestRoundingMode: MPSGraphResizeNearestRoundingMode, constantValue: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func sampleGrid(withSourceTensor source: MPSGraphTensor, coordinateTensor coordinates: MPSGraphTensor, layout: MPSGraphTensorNamedDataLayout, normalizeCoordinates: Bool, relativeCoordinates: Bool, alignCorners: Bool, paddingMode: MPSGraphPaddingMode, nearestRoundingMode: MPSGraphResizeNearestRoundingMode, constantValue: Double, name: String?) -> MPSGraphTensor
method · iOS 16.2+

sampleGrid

TypeScript
sampleGridWithSourceTensorCoordinateTensorLayoutNormalizeCoordinatesRelativeCoordinatesAlignCornersPaddingModeSamplingModeConstantValueName(source: MPSGraphTensor, coordinates: MPSGraphTensor, layout: MPSGraphTensorNamedDataLayout, normalizeCoordinates: boolean, relativeCoordinates: boolean, alignCorners: boolean, paddingMode: MPSGraphPaddingMode, samplingMode: MPSGraphResizeMode, constantValue: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func sampleGrid(withSourceTensor source: MPSGraphTensor, coordinateTensor coordinates: MPSGraphTensor, layout: MPSGraphTensorNamedDataLayout, normalizeCoordinates: Bool, relativeCoordinates: Bool, alignCorners: Bool, paddingMode: MPSGraphPaddingMode, samplingMode: MPSGraphResizeMode, constantValue: Double, name: String?) -> MPSGraphTensor
method · iOS 27.0+

scaledDotProductAttention

TypeScript
scaledDotProductAttentionQueryKeyValueDescriptorName(queryTensor: MPSGraphTensor, keyTensor: MPSGraphTensor, valueTensor: MPSGraphTensor, descriptor: MPSGraphSDPADescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func scaledDotProductAttention(query queryTensor: MPSGraphTensor, key keyTensor: MPSGraphTensor, value valueTensor: MPSGraphTensor, descriptor: MPSGraphSDPADescriptor, name: String?) -> MPSGraphTensor
method · iOS 18.0+

scaledDotProductAttention

TypeScript
scaledDotProductAttentionQueryKeyValueMaskScaleName(queryTensor: MPSGraphTensor, keyTensor: MPSGraphTensor, valueTensor: MPSGraphTensor, maskTensor: (MPSGraphTensor) | null, scale: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func scaledDotProductAttention(query queryTensor: MPSGraphTensor, key keyTensor: MPSGraphTensor, value valueTensor: MPSGraphTensor, mask maskTensor: MPSGraphTensor?, scale: Float, name: String?) -> MPSGraphTensor
method · iOS 18.0+

scaledDotProductAttention

TypeScript
scaledDotProductAttentionQueryKeyValueScaleName(queryTensor: MPSGraphTensor, keyTensor: MPSGraphTensor, valueTensor: MPSGraphTensor, scale: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func scaledDotProductAttention(query queryTensor: MPSGraphTensor, key keyTensor: MPSGraphTensor, value valueTensor: MPSGraphTensor, scale: Float, name: String?) -> MPSGraphTensor
method · iOS 15.4+

scatterAlongAxis

TypeScript
scatterAlongAxisDataUpdatesIndicesModeName(axis: number, dataTensor: MPSGraphTensor, updatesTensor: MPSGraphTensor, indicesTensor: MPSGraphTensor, mode: MPSGraphScatterMode, name?: (string) | null): MPSGraphTensor
Swift declaration
func scatterAlongAxis(_ axis: Int, data dataTensor: MPSGraphTensor, updates updatesTensor: MPSGraphTensor, indices indicesTensor: MPSGraphTensor, mode: MPSGraphScatterMode, name: String?) -> MPSGraphTensor
method · iOS 15.4+

scatterAlongAxis

TypeScript
scatterAlongAxisUpdatesIndicesShapeModeName(axis: number, updatesTensor: MPSGraphTensor, indicesTensor: MPSGraphTensor, shape: Array<_Foundation_NSNumber>, mode: MPSGraphScatterMode, name?: (string) | null): MPSGraphTensor
Swift declaration
func scatterAlongAxis(_ axis: Int, updates updatesTensor: MPSGraphTensor, indices indicesTensor: MPSGraphTensor, shape: [NSNumber], mode: MPSGraphScatterMode, name: String?) -> MPSGraphTensor
method · iOS 15.4+

scatterAlongAxisTensor

TypeScript
scatterAlongAxisTensorDataUpdatesIndicesModeName(axisTensor: MPSGraphTensor, dataTensor: MPSGraphTensor, updatesTensor: MPSGraphTensor, indicesTensor: MPSGraphTensor, mode: MPSGraphScatterMode, name?: (string) | null): MPSGraphTensor
Swift declaration
func scatterAlongAxisTensor(_ axisTensor: MPSGraphTensor, data dataTensor: MPSGraphTensor, updates updatesTensor: MPSGraphTensor, indices indicesTensor: MPSGraphTensor, mode: MPSGraphScatterMode, name: String?) -> MPSGraphTensor
method · iOS 15.4+

scatterAlongAxisTensor

TypeScript
scatterAlongAxisTensorUpdatesIndicesShapeModeName(axisTensor: MPSGraphTensor, updatesTensor: MPSGraphTensor, indicesTensor: MPSGraphTensor, shape: Array<_Foundation_NSNumber>, mode: MPSGraphScatterMode, name?: (string) | null): MPSGraphTensor
Swift declaration
func scatterAlongAxisTensor(_ axisTensor: MPSGraphTensor, updates updatesTensor: MPSGraphTensor, indices indicesTensor: MPSGraphTensor, shape: [NSNumber], mode: MPSGraphScatterMode, name: String?) -> MPSGraphTensor
method · iOS 15.0+

scatterNDWithData

TypeScript
scatterNDWithData(dataTensor: MPSGraphTensor, updatesTensor: MPSGraphTensor, indicesTensor: MPSGraphTensor, batchDimensions: number, mode: MPSGraphScatterMode, name?: (string) | null): MPSGraphTensor
Swift declaration
func scatterNDWithData(_ dataTensor: MPSGraphTensor, updates updatesTensor: MPSGraphTensor, indices indicesTensor: MPSGraphTensor, batchDimensions: Int, mode: MPSGraphScatterMode, name: String?) -> MPSGraphTensor
method · iOS 14.0+

scatterND

TypeScript
scatterNDWithUpdatesTensorIndicesTensorShapeBatchDimensionsModeName(updatesTensor: MPSGraphTensor, indicesTensor: MPSGraphTensor, shape: Array<_Foundation_NSNumber>, batchDimensions: number, mode: MPSGraphScatterMode, name?: (string) | null): MPSGraphTensor
Swift declaration
func scatterND(withUpdatesTensor updatesTensor: MPSGraphTensor, indicesTensor: MPSGraphTensor, shape: [NSNumber], batchDimensions: Int, mode: MPSGraphScatterMode, name: String?) -> MPSGraphTensor
method · iOS 14.0+

scatterND

TypeScript
scatterNDWithUpdatesTensorIndicesTensorShapeBatchDimensionsName(updatesTensor: MPSGraphTensor, indicesTensor: MPSGraphTensor, shape: Array<_Foundation_NSNumber>, batchDimensions: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func scatterND(withUpdatesTensor updatesTensor: MPSGraphTensor, indicesTensor: MPSGraphTensor, shape: [NSNumber], batchDimensions: Int, name: String?) -> MPSGraphTensor
method · iOS 15.0+

scatterWithData

TypeScript
scatterWithData(dataTensor: MPSGraphTensor, updatesTensor: MPSGraphTensor, indicesTensor: MPSGraphTensor, axis: number, mode: MPSGraphScatterMode, name?: (string) | null): MPSGraphTensor
Swift declaration
func scatterWithData(_ dataTensor: MPSGraphTensor, updates updatesTensor: MPSGraphTensor, indices indicesTensor: MPSGraphTensor, axis: Int, mode: MPSGraphScatterMode, name: String?) -> MPSGraphTensor
method · iOS 15.0+

scatter

TypeScript
scatter(updatesTensor: MPSGraphTensor, indicesTensor: MPSGraphTensor, shape: Array<_Foundation_NSNumber>, axis: number, mode: MPSGraphScatterMode, name?: (string) | null): MPSGraphTensor
Swift declaration
func scatter(_ updatesTensor: MPSGraphTensor, indices indicesTensor: MPSGraphTensor, shape: [NSNumber], axis: Int, mode: MPSGraphScatterMode, name: String?) -> MPSGraphTensor
method · iOS 14.0+

select

TypeScript
select(predicateTensor: MPSGraphTensor, truePredicateTensor: MPSGraphTensor, falseSelectTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func select(predicate predicateTensor: MPSGraphTensor, trueTensor truePredicateTensor: MPSGraphTensor, falseTensor falseSelectTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 15.0+

shapeOf

TypeScript
shapeOf(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func shapeOf(_ tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

sigmoidGradient

TypeScript
sigmoidGradient(gradient: MPSGraphTensor, source: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func sigmoidGradient(withIncomingGradient gradient: MPSGraphTensor, sourceTensor source: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

sigmoid

TypeScript
sigmoid(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func sigmoid(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

sign

TypeScript
sign(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func sign(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

signbit

TypeScript
signbit(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func signbit(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

sin

TypeScript
sin(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func sin(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 15.4+

singleGateRNNGradients

TypeScript
singleGateRNNGradientsRecurrentWeightSourceGradientZStateInitStateDescriptorName(source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, sourceGradient: MPSGraphTensor, zState: MPSGraphTensor, initState: (MPSGraphTensor) | null, descriptor: MPSGraphSingleGateRNNDescriptor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func singleGateRNNGradients(_ source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, sourceGradient: MPSGraphTensor, zState: MPSGraphTensor, initState: MPSGraphTensor?, descriptor: MPSGraphSingleGateRNNDescriptor, name: String?) -> [MPSGraphTensor]
method · iOS 15.4+

singleGateRNNGradients

TypeScript
singleGateRNNGradientsRecurrentWeightSourceGradientZStateInputWeightBiasInitStateDescriptorName(source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, sourceGradient: MPSGraphTensor, zState: MPSGraphTensor, inputWeight: (MPSGraphTensor) | null, bias: (MPSGraphTensor) | null, initState: (MPSGraphTensor) | null, descriptor: MPSGraphSingleGateRNNDescriptor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func singleGateRNNGradients(_ source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, sourceGradient: MPSGraphTensor, zState: MPSGraphTensor, inputWeight: MPSGraphTensor?, bias: MPSGraphTensor?, initState: MPSGraphTensor?, descriptor: MPSGraphSingleGateRNNDescriptor, name: String?) -> [MPSGraphTensor]
method · iOS 15.4+

singleGateRNNGradients

TypeScript
singleGateRNNGradientsRecurrentWeightSourceGradientZStateInputWeightBiasInitStateMaskDescriptorName(source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, sourceGradient: MPSGraphTensor, zState: MPSGraphTensor, inputWeight: (MPSGraphTensor) | null, bias: (MPSGraphTensor) | null, initState: (MPSGraphTensor) | null, mask: (MPSGraphTensor) | null, descriptor: MPSGraphSingleGateRNNDescriptor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func singleGateRNNGradients(_ source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, sourceGradient: MPSGraphTensor, zState: MPSGraphTensor, inputWeight: MPSGraphTensor?, bias: MPSGraphTensor?, initState: MPSGraphTensor?, mask: MPSGraphTensor?, descriptor: MPSGraphSingleGateRNNDescriptor, name: String?) -> [MPSGraphTensor]
method · iOS 15.4+

singleGateRNNGradients

TypeScript
singleGateRNNGradientsRecurrentWeightSourceGradientZStateStateGradientInputWeightBiasInitStateMaskDescriptorName(source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, sourceGradient: MPSGraphTensor, zState: MPSGraphTensor, stateGradient: (MPSGraphTensor) | null, inputWeight: (MPSGraphTensor) | null, bias: (MPSGraphTensor) | null, initState: (MPSGraphTensor) | null, mask: (MPSGraphTensor) | null, descriptor: MPSGraphSingleGateRNNDescriptor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func singleGateRNNGradients(_ source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, sourceGradient: MPSGraphTensor, zState: MPSGraphTensor, stateGradient: MPSGraphTensor?, inputWeight: MPSGraphTensor?, bias: MPSGraphTensor?, initState: MPSGraphTensor?, mask: MPSGraphTensor?, descriptor: MPSGraphSingleGateRNNDescriptor, name: String?) -> [MPSGraphTensor]
method · iOS 15.4+

singleGateRNN

TypeScript
singleGateRNNRecurrentWeightInitStateDescriptorName(source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, initState: (MPSGraphTensor) | null, descriptor: MPSGraphSingleGateRNNDescriptor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func singleGateRNN(_ source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, initState: MPSGraphTensor?, descriptor: MPSGraphSingleGateRNNDescriptor, name: String?) -> [MPSGraphTensor]
method · iOS 15.4+

singleGateRNN

TypeScript
singleGateRNNRecurrentWeightInputWeightBiasInitStateDescriptorName(source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, inputWeight: (MPSGraphTensor) | null, bias: (MPSGraphTensor) | null, initState: (MPSGraphTensor) | null, descriptor: MPSGraphSingleGateRNNDescriptor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func singleGateRNN(_ source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, inputWeight: MPSGraphTensor?, bias: MPSGraphTensor?, initState: MPSGraphTensor?, descriptor: MPSGraphSingleGateRNNDescriptor, name: String?) -> [MPSGraphTensor]
method · iOS 15.4+

singleGateRNN

TypeScript
singleGateRNNRecurrentWeightInputWeightBiasInitStateMaskDescriptorName(source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, inputWeight: (MPSGraphTensor) | null, bias: (MPSGraphTensor) | null, initState: (MPSGraphTensor) | null, mask: (MPSGraphTensor) | null, descriptor: MPSGraphSingleGateRNNDescriptor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func singleGateRNN(_ source: MPSGraphTensor, recurrentWeight: MPSGraphTensor, inputWeight: MPSGraphTensor?, bias: MPSGraphTensor?, initState: MPSGraphTensor?, mask: MPSGraphTensor?, descriptor: MPSGraphSingleGateRNNDescriptor, name: String?) -> [MPSGraphTensor]
method · iOS 14.0+

sinh

TypeScript
sinh(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func sinh(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 18.2+

sliceGradientTensor

TypeScript
sliceGradientTensorFwdInShapeTensorStartEndStrideTensorStartMaskEndMaskSqueezeMaskName(inputGradientTensor: MPSGraphTensor, fwdInShapeTensor: MPSGraphTensor, startTensor: MPSGraphTensor, endTensor: MPSGraphTensor, strideTensor: MPSGraphTensor, startMask: number, endMask: number, squeezeMask: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func sliceGradientTensor(_ inputGradientTensor: MPSGraphTensor, fwdInShapeTensor: MPSGraphTensor, start startTensor: MPSGraphTensor, end endTensor: MPSGraphTensor, strideTensor: MPSGraphTensor, startMask: UInt32, endMask: UInt32, squeezeMask: UInt32, name: String?) -> MPSGraphTensor
method · iOS 18.2+

sliceGradientTensor

TypeScript
sliceGradientTensorFwdInShapeTensorStartSizeTensorSqueezeMaskName(inputGradientTensor: MPSGraphTensor, fwdInShapeTensor: MPSGraphTensor, startTensor: MPSGraphTensor, sizeTensor: MPSGraphTensor, squeezeMask: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func sliceGradientTensor(_ inputGradientTensor: MPSGraphTensor, fwdInShapeTensor: MPSGraphTensor, start startTensor: MPSGraphTensor, sizeTensor: MPSGraphTensor, squeezeMask: UInt32, name: String?) -> MPSGraphTensor
method · iOS 14.0+

sliceGradientTensor

TypeScript
sliceGradientTensorFwdInShapeTensorStartsEndsStridesName(inputGradientTensor: MPSGraphTensor, fwdInShapeTensor: MPSGraphTensor, starts: Array<_Foundation_NSNumber>, ends: Array<_Foundation_NSNumber>, strides: Array<_Foundation_NSNumber>, name?: (string) | null): MPSGraphTensor
Swift declaration
func sliceGradientTensor(_ inputGradientTensor: MPSGraphTensor, fwdInShapeTensor: MPSGraphTensor, starts: [NSNumber], ends: [NSNumber], strides: [NSNumber], name: String?) -> MPSGraphTensor
method · iOS 14.0+

sliceGradientTensor

TypeScript
sliceGradientTensorFwdInShapeTensorStartsEndsStridesStartMaskEndMaskSqueezeMaskName(inputGradientTensor: MPSGraphTensor, fwdInShapeTensor: MPSGraphTensor, starts: Array<_Foundation_NSNumber>, ends: Array<_Foundation_NSNumber>, strides: Array<_Foundation_NSNumber>, startMask: number, endMask: number, squeezeMask: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func sliceGradientTensor(_ inputGradientTensor: MPSGraphTensor, fwdInShapeTensor: MPSGraphTensor, starts: [NSNumber], ends: [NSNumber], strides: [NSNumber], startMask: UInt32, endMask: UInt32, squeezeMask: UInt32, name: String?) -> MPSGraphTensor
method · iOS 14.0+

sliceTensor

TypeScript
sliceTensorDimensionStartLengthName(tensor: MPSGraphTensor, dimensionIndex: number, start: number, length: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func sliceTensor(_ tensor: MPSGraphTensor, dimension dimensionIndex: Int, start: Int, length: Int, name: String?) -> MPSGraphTensor
method · iOS 18.2+

sliceTensor

TypeScript
sliceTensorStartEndStrideTensorStartMaskEndMaskSqueezeMaskName(tensor: MPSGraphTensor, startTensor: MPSGraphTensor, endTensor: MPSGraphTensor, strideTensor: MPSGraphTensor, startMask: number, endMask: number, squeezeMask: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func sliceTensor(_ tensor: MPSGraphTensor, start startTensor: MPSGraphTensor, end endTensor: MPSGraphTensor, strideTensor: MPSGraphTensor, startMask: UInt32, endMask: UInt32, squeezeMask: UInt32, name: String?) -> MPSGraphTensor
method · iOS 18.2+

sliceTensor

TypeScript
sliceTensorStartSizeTensorSqueezeMaskName(tensor: MPSGraphTensor, startTensor: MPSGraphTensor, sizeTensor: MPSGraphTensor, squeezeMask: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func sliceTensor(_ tensor: MPSGraphTensor, start startTensor: MPSGraphTensor, sizeTensor: MPSGraphTensor, squeezeMask: UInt32, name: String?) -> MPSGraphTensor
method · iOS 14.0+

sliceTensor

TypeScript
sliceTensorStartsEndsStridesName(tensor: MPSGraphTensor, starts: Array<_Foundation_NSNumber>, ends: Array<_Foundation_NSNumber>, strides: Array<_Foundation_NSNumber>, name?: (string) | null): MPSGraphTensor
Swift declaration
func sliceTensor(_ tensor: MPSGraphTensor, starts: [NSNumber], ends: [NSNumber], strides: [NSNumber], name: String?) -> MPSGraphTensor
method · iOS 14.0+

sliceTensor

TypeScript
sliceTensorStartsEndsStridesStartMaskEndMaskSqueezeMaskName(tensor: MPSGraphTensor, starts: Array<_Foundation_NSNumber>, ends: Array<_Foundation_NSNumber>, strides: Array<_Foundation_NSNumber>, startMask: number, endMask: number, squeezeMask: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func sliceTensor(_ tensor: MPSGraphTensor, starts: [NSNumber], ends: [NSNumber], strides: [NSNumber], startMask: UInt32, endMask: UInt32, squeezeMask: UInt32, name: String?) -> MPSGraphTensor
method · iOS 18.0+

sliceUpdateDataTensor

TypeScript
sliceUpdateDataTensorUpdateStartsEndsStridesName(dataTensor: MPSGraphTensor, updateTensor: MPSGraphTensor, starts: Array<_Foundation_NSNumber>, ends: Array<_Foundation_NSNumber>, strides: Array<_Foundation_NSNumber>, name?: (string) | null): MPSGraphTensor
Swift declaration
func sliceUpdateDataTensor(_ dataTensor: MPSGraphTensor, update updateTensor: MPSGraphTensor, starts: [NSNumber], ends: [NSNumber], strides: [NSNumber], name: String?) -> MPSGraphTensor
method · iOS 17.4+

sliceUpdateDataTensor

TypeScript
sliceUpdateDataTensorUpdateStartsEndsStridesStartMaskEndMaskSqueezeMaskName(dataTensor: MPSGraphTensor, updateTensor: MPSGraphTensor, starts: Array<_Foundation_NSNumber>, ends: Array<_Foundation_NSNumber>, strides: Array<_Foundation_NSNumber>, startMask: number, endMask: number, squeezeMask: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func sliceUpdateDataTensor(_ dataTensor: MPSGraphTensor, update updateTensor: MPSGraphTensor, starts: [NSNumber], ends: [NSNumber], strides: [NSNumber], startMask: UInt32, endMask: UInt32, squeezeMask: UInt32, name: String?) -> MPSGraphTensor
method · iOS 18.0+

sliceUpdateDataTensor

TypeScript
sliceUpdateDataTensorUpdateStartsTensorEndsTensorStridesTensorName(dataTensor: MPSGraphTensor, updateTensor: MPSGraphTensor, startsTensor: MPSGraphTensor, endsTensor: MPSGraphTensor, stridesTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func sliceUpdateDataTensor(_ dataTensor: MPSGraphTensor, update updateTensor: MPSGraphTensor, startsTensor: MPSGraphTensor, endsTensor: MPSGraphTensor, stridesTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 17.4+

sliceUpdateDataTensor

TypeScript
sliceUpdateDataTensorUpdateStartsTensorEndsTensorStridesTensorStartMaskEndMaskSqueezeMaskName(dataTensor: MPSGraphTensor, updateTensor: MPSGraphTensor, startsTensor: MPSGraphTensor, endsTensor: MPSGraphTensor, stridesTensor: MPSGraphTensor, startMask: number, endMask: number, squeezeMask: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func sliceUpdateDataTensor(_ dataTensor: MPSGraphTensor, update updateTensor: MPSGraphTensor, startsTensor: MPSGraphTensor, endsTensor: MPSGraphTensor, stridesTensor: MPSGraphTensor, startMask: UInt32, endMask: UInt32, squeezeMask: UInt32, name: String?) -> MPSGraphTensor
method · iOS 14.0+

softMaxCrossEntropyGradient

TypeScript
softMaxCrossEntropyGradient(gradientTensor: MPSGraphTensor, sourceTensor: MPSGraphTensor, labelsTensor: MPSGraphTensor, axis: number, reductionType: MPSGraphLossReductionType, name?: (string) | null): MPSGraphTensor
Swift declaration
func softMaxCrossEntropyGradient(_ gradientTensor: MPSGraphTensor, source sourceTensor: MPSGraphTensor, labels labelsTensor: MPSGraphTensor, axis: Int, reuctionType reductionType: MPSGraphLossReductionType, name: String?) -> MPSGraphTensor
method · iOS 14.0+

softMaxCrossEntropy

TypeScript
softMaxCrossEntropy(sourceTensor: MPSGraphTensor, labelsTensor: MPSGraphTensor, axis: number, reductionType: MPSGraphLossReductionType, name?: (string) | null): MPSGraphTensor
Swift declaration
func softMaxCrossEntropy(_ sourceTensor: MPSGraphTensor, labels labelsTensor: MPSGraphTensor, axis: Int, reuctionType reductionType: MPSGraphLossReductionType, name: String?) -> MPSGraphTensor
method · iOS 14.0+

softMaxGradient

TypeScript
softMaxGradient(gradient: MPSGraphTensor, source: MPSGraphTensor, axis: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func softMaxGradient(withIncomingGradient gradient: MPSGraphTensor, sourceTensor source: MPSGraphTensor, axis: Int, name: String?) -> MPSGraphTensor
method · iOS 14.0+

softMax

TypeScript
softMax(tensor: MPSGraphTensor, axis: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func softMax(with tensor: MPSGraphTensor, axis: Int, name: String?) -> MPSGraphTensor
method · iOS 16.0+

sort

TypeScript
sortAxisDescendingName(tensor: MPSGraphTensor, axis: number, descending: boolean, name?: (string) | null): MPSGraphTensor
Swift declaration
func sort(_ tensor: MPSGraphTensor, axis: Int, descending: Bool, name: String?) -> MPSGraphTensor
method · iOS 16.0+

sort

TypeScript
sortAxisName(tensor: MPSGraphTensor, axis: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func sort(_ tensor: MPSGraphTensor, axis: Int, name: String?) -> MPSGraphTensor
method · iOS 16.0+

sort

TypeScript
sortAxisTensorDescendingName(tensor: MPSGraphTensor, axisTensor: MPSGraphTensor, descending: boolean, name?: (string) | null): MPSGraphTensor
Swift declaration
func sort(_ tensor: MPSGraphTensor, axisTensor: MPSGraphTensor, descending: Bool, name: String?) -> MPSGraphTensor
method · iOS 16.0+

sort

TypeScript
sortAxisTensorName(tensor: MPSGraphTensor, axisTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func sort(_ tensor: MPSGraphTensor, axisTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 16.1+

spaceToBatch

TypeScript
spaceToBatchSpatialAxesBatchAxisBlockDimensionsUsePixelShuffleOrderName(tensor: MPSGraphTensor, spatialAxes: Array<_Foundation_NSNumber>, batchAxis: number, blockDimensions: Array<_Foundation_NSNumber>, usePixelShuffleOrder: boolean, name?: (string) | null): MPSGraphTensor
Swift declaration
func spaceToBatch(_ tensor: MPSGraphTensor, spatialAxes: [NSNumber], batchAxis: Int, blockDimensions: [NSNumber], usePixelShuffleOrder: Bool, name: String?) -> MPSGraphTensor
method · iOS 16.1+

spaceToBatch

TypeScript
spaceToBatchSpatialAxesTensorBatchAxisTensorBlockDimensionsTensorUsePixelShuffleOrderName(tensor: MPSGraphTensor, spatialAxesTensor: MPSGraphTensor, batchAxisTensor: MPSGraphTensor, blockDimensionsTensor: MPSGraphTensor, usePixelShuffleOrder: boolean, name?: (string) | null): MPSGraphTensor
Swift declaration
func spaceToBatch(_ tensor: MPSGraphTensor, spatialAxesTensor: MPSGraphTensor, batchAxisTensor: MPSGraphTensor, blockDimensionsTensor: MPSGraphTensor, usePixelShuffleOrder: Bool, name: String?) -> MPSGraphTensor
method · iOS 15.0+

space

TypeScript
spaceToDepth2DTensorWidthAxisHeightAxisDepthAxisBlockSizeUsePixelShuffleOrderName(tensor: MPSGraphTensor, widthAxis: number, heightAxis: number, depthAxis: number, blockSize: number, usePixelShuffleOrder: boolean, name?: (string) | null): MPSGraphTensor
Swift declaration
func space(toDepth2DTensor tensor: MPSGraphTensor, widthAxis: Int, heightAxis: Int, depthAxis: Int, blockSize: Int, usePixelShuffleOrder: Bool, name: String?) -> MPSGraphTensor
method · iOS 15.0+

space

TypeScript
spaceToDepth2DTensorWidthAxisTensorHeightAxisTensorDepthAxisTensorBlockSizeUsePixelShuffleOrderName(tensor: MPSGraphTensor, widthAxisTensor: MPSGraphTensor, heightAxisTensor: MPSGraphTensor, depthAxisTensor: MPSGraphTensor, blockSize: number, usePixelShuffleOrder: boolean, name?: (string) | null): MPSGraphTensor
Swift declaration
func space(toDepth2DTensor tensor: MPSGraphTensor, widthAxisTensor: MPSGraphTensor, heightAxisTensor: MPSGraphTensor, depthAxisTensor: MPSGraphTensor, blockSize: Int, usePixelShuffleOrder: Bool, name: String?) -> MPSGraphTensor
method · iOS 15.0+

sparseTensor

TypeScript
sparseTensorSparseTensorWithDescriptorTensorsShapeName(sparseDescriptor: MPSGraphCreateSparseOpDescriptor, inputTensorArray: Array<MPSGraphTensor>, shape: Array<_Foundation_NSNumber>, name?: (string) | null): MPSGraphTensor
Swift declaration
func sparseTensor(sparseTensorWithDescriptor sparseDescriptor: MPSGraphCreateSparseOpDescriptor, tensors inputTensorArray: [MPSGraphTensor], shape: [NSNumber], name: String?) -> MPSGraphTensor
method · iOS 15.0+

sparseTensor

TypeScript
sparseTensorSparseTensorWithTypeTensorsShapeDataTypeName(sparseStorageType: MPSGraphSparseStorageType, inputTensorArray: Array<MPSGraphTensor>, shape: Array<_Foundation_NSNumber>, dataType: _MetalPerformanceShaders_MPSDataType, name?: (string) | null): MPSGraphTensor
Swift declaration
func sparseTensor(sparseTensorWithType sparseStorageType: MPSGraphSparseStorageType, tensors inputTensorArray: [MPSGraphTensor], shape: [NSNumber], dataType: MPSDataType, name: String?) -> MPSGraphTensor
method · iOS 15.4+

split

TypeScript
splitNumSplitsAxisName(tensor: MPSGraphTensor, numSplits: number, axis: number, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func split(_ tensor: MPSGraphTensor, numSplits: Int, axis: Int, name: String?) -> [MPSGraphTensor]
method · iOS 15.4+

split

TypeScript
splitSplitSizesAxisName(tensor: MPSGraphTensor, splitSizes: Array<_Foundation_NSNumber>, axis: number, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func split(_ tensor: MPSGraphTensor, splitSizes: [NSNumber], axis: Int, name: String?) -> [MPSGraphTensor]
method · iOS 15.4+

split

TypeScript
splitSplitSizesTensorAxisName(tensor: MPSGraphTensor, splitSizesTensor: MPSGraphTensor, axis: number, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func split(_ tensor: MPSGraphTensor, splitSizesTensor: MPSGraphTensor, axis: Int, name: String?) -> [MPSGraphTensor]
method · iOS 14.0+

squareRoot

TypeScript
squareRoot(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func squareRoot(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

square

TypeScript
square(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func square(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 15.4+

squeeze

TypeScript
squeezeAxesName(tensor: MPSGraphTensor, axes: Array<_Foundation_NSNumber>, name?: (string) | null): MPSGraphTensor
Swift declaration
func squeeze(_ tensor: MPSGraphTensor, axes: [NSNumber], name: String?) -> MPSGraphTensor
method · iOS 15.4+

squeeze

TypeScript
squeezeAxesTensorName(tensor: MPSGraphTensor, axesTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func squeeze(_ tensor: MPSGraphTensor, axesTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 15.4+

squeeze

TypeScript
squeezeAxisName(tensor: MPSGraphTensor, axis: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func squeeze(_ tensor: MPSGraphTensor, axis: Int, name: String?) -> MPSGraphTensor
method · iOS 15.4+

squeeze

TypeScript
squeezeName(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func squeeze(_ tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 15.4+

stack

TypeScript
stack(inputTensors: Array<MPSGraphTensor>, axis: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func stack(_ inputTensors: [MPSGraphTensor], axis: Int, name: String?) -> MPSGraphTensor
method · iOS 15.0+

stencil

TypeScript
stencil(source: MPSGraphTensor, weights: MPSGraphTensor, descriptor: MPSGraphStencilOpDescriptor, name?: (string) | null): MPSGraphTensor
Swift declaration
func stencil(withSourceTensor source: MPSGraphTensor, weightsTensor weights: MPSGraphTensor, descriptor: MPSGraphStencilOpDescriptor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

stochasticGradientDescent

TypeScript
stochasticGradientDescent(learningRateTensor: MPSGraphTensor, valuesTensor: MPSGraphTensor, gradientTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func stochasticGradientDescent(learningRate learningRateTensor: MPSGraphTensor, values valuesTensor: MPSGraphTensor, gradient gradientTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

subtraction

TypeScript
subtraction(primaryTensor: MPSGraphTensor, secondaryTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func subtraction(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

tan

TypeScript
tan(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func tan(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

tanh

TypeScript
tanh(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func tanh(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

tileGradient

TypeScript
tileGradient(incomingGradientTensor: MPSGraphTensor, sourceTensor: MPSGraphTensor, multiplier: Array<_Foundation_NSNumber>, name?: (string) | null): MPSGraphTensor
Swift declaration
func tileGradient(withIncomingGradientTensor incomingGradientTensor: MPSGraphTensor, sourceTensor: MPSGraphTensor, withMultiplier multiplier: [NSNumber], name: String?) -> MPSGraphTensor
method · iOS 14.0+

tileTensor

TypeScript
tileTensor(tensor: MPSGraphTensor, multiplier: Array<_Foundation_NSNumber>, name?: (string) | null): MPSGraphTensor
Swift declaration
func tileTensor(_ tensor: MPSGraphTensor, withMultiplier multiplier: [NSNumber], name: String?) -> MPSGraphTensor
method · iOS 17.0+

topKGradient

TypeScript
topKGradientSourceAxisKName(gradient: MPSGraphTensor, source: MPSGraphTensor, axis: number, k: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func topKGradient(_ gradient: MPSGraphTensor, source: MPSGraphTensor, axis: Int, k: Int, name: String?) -> MPSGraphTensor
method · iOS 17.0+

topKGradient

TypeScript
topKGradientSourceAxisTensorKTensorName(gradient: MPSGraphTensor, source: MPSGraphTensor, axisTensor: MPSGraphTensor, kTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func topKGradient(_ gradient: MPSGraphTensor, source: MPSGraphTensor, axisTensor: MPSGraphTensor, kTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method

topKGradient

TypeScript
topKGradientInputKName(gradient: MPSGraphTensor, source: MPSGraphTensor, k: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func topKGradient(_ gradient: MPSGraphTensor, input source: MPSGraphTensor, k: Int, name: String?) -> MPSGraphTensor
method

topKGradient

TypeScript
topKGradientInputKTensorName(gradient: MPSGraphTensor, source: MPSGraphTensor, kTensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func topKGradient(_ gradient: MPSGraphTensor, input source: MPSGraphTensor, kTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 17.0+

topK

TypeScript
topKAxisKName(source: MPSGraphTensor, axis: number, k: number, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func topK(_ source: MPSGraphTensor, axis: Int, k: Int, name: String?) -> [MPSGraphTensor]
method · iOS 17.0+

topK

TypeScript
topKAxisTensorKTensorName(source: MPSGraphTensor, axisTensor: MPSGraphTensor, kTensor: MPSGraphTensor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func topK(_ source: MPSGraphTensor, axisTensor: MPSGraphTensor, kTensor: MPSGraphTensor, name: String?) -> [MPSGraphTensor]
method · iOS 15.0+

topK

TypeScript
topKKName(source: MPSGraphTensor, k: number, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func topK(_ source: MPSGraphTensor, k: Int, name: String?) -> [MPSGraphTensor]
method · iOS 15.0+

topK

TypeScript
topKKTensorName(source: MPSGraphTensor, kTensor: MPSGraphTensor, name?: (string) | null): Array<MPSGraphTensor>
Swift declaration
func topK(_ source: MPSGraphTensor, kTensor: MPSGraphTensor, name: String?) -> [MPSGraphTensor]
method · iOS 14.0+

transposeTensor

TypeScript
transposeTensor(tensor: MPSGraphTensor, dimensionIndex: number, dimensionIndex2: number, name?: (string) | null): MPSGraphTensor
Swift declaration
func transposeTensor(_ tensor: MPSGraphTensor, dimension dimensionIndex: Int, withDimension dimensionIndex2: Int, name: String?) -> MPSGraphTensor
method · iOS 16.0+

transpose

TypeScript
transpose(tensor: MPSGraphTensor, permutation: Array<_Foundation_NSNumber>, name?: (string) | null): MPSGraphTensor
Swift declaration
func transpose(_ tensor: MPSGraphTensor, permutation: [NSNumber], name: String?) -> MPSGraphTensor
method · iOS 16.0+

truncate

TypeScript
truncate(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func truncate(_ tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 18.0+

variableFromTensor

TypeScript
variableFromTensor(tensor: MPSGraphTensor, name?: (string) | null): MPSGraphTensor
Swift declaration
func variableFromTensor(_ tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
method · iOS 14.0+

variable

TypeScript
variable(data: ArrayBuffer, shape: Array<_Foundation_NSNumber>, dataType: _MetalPerformanceShaders_MPSDataType, name?: (string) | null): MPSGraphTensor
Swift declaration
func variable(with data: Data, shape: [NSNumber], dataType: MPSDataType, name: String?) -> MPSGraphTensor
method · iOS 14.0+

variance

TypeScript
varianceOfAxesName(tensor: MPSGraphTensor, axes: Array<_Foundation_NSNumber>, name?: (string) | null): MPSGraphTensor
Swift declaration
func variance(of tensor: MPSGraphTensor, axes: [NSNumber], name: String?) -> MPSGraphTensor
method · iOS 14.0+

variance

TypeScript
varianceOfMeanAxesName(tensor: MPSGraphTensor, meanTensor: MPSGraphTensor, axes: Array<_Foundation_NSNumber>, name?: (string) | null): MPSGraphTensor
Swift declaration
func variance(of tensor: MPSGraphTensor, mean meanTensor: MPSGraphTensor, axes: [NSNumber], name: String?) -> MPSGraphTensor
get · iOS 14.0+

options

TypeScript
get options(): MPSGraphOptions
Swift declaration
var options: MPSGraphOptions { get set }
set · iOS 14.0+

options

TypeScript
set options(value: MPSGraphOptions)
Swift declaration
var options: MPSGraphOptions { get set }
get · iOS 14.0+

placeholderTensors

TypeScript
get placeholderTensors(): Array<MPSGraphTensor>
Swift declaration
var placeholderTensors: [MPSGraphTensor] { get }

Skipped declarations

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

MPSGraph.controlDependency(with:dependentBlock:name:)

callback cannot propagate synchronous failure

MPSGraph.if(_:then:else:name:)

callback cannot propagate synchronous failure

MPSGraph.while(initialInputs:before:after:name:)

callback cannot propagate synchronous failure

MPSGraph.for(lowerBound:upperBound:step:initialBodyArguments:body:name:)

callback cannot propagate synchronous failure

MPSGraph.for(numberOfIterations:initialBodyArguments:body:name:)

callback cannot propagate synchronous failure

All MetalPerformanceShadersGraph types →