Package org.robovm.apple.metalpsgraph
Class MPSGraph
java.lang.Object
org.robovm.rt.bro.NativeObject
org.robovm.objc.ObjCObject
org.robovm.apple.foundation.NSObject
org.robovm.apple.metalpsgraph.MPSGraph
- All Implemented Interfaces:
NSObjectProtocol,ObjCProtocol
public class MPSGraph extends NSObject
- Since:
- Available in iOS 14.0 and later.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMPSGraph.MPSGraphPtrNested classes/interfaces inherited from class org.robovm.apple.foundation.NSObject
NSObject.Handle, NSObject.Marshaler, NSObject.NoRetainMarshaler, NSObject.NSKeyValueObserver, NSObject.NSObjectPtr, NSObject.SkipInitNested classes/interfaces inherited from class org.robovm.objc.ObjCObject
ObjCObject.ObjCObjectPtr, ObjCObject.Super -
Field Summary
Fields inherited from class org.robovm.apple.foundation.NSObject
FLAG_NO_RETAINFields inherited from class org.robovm.objc.ObjCObject
customClass -
Constructor Summary
Constructors Modifier Constructor Description MPSGraph()protectedMPSGraph(NSObject.Handle h, long handle)protectedMPSGraph(NSObject.SkipInit skipInit) -
Method Summary
Methods inherited from class org.robovm.apple.foundation.NSObject
addKeyValueObserver, addKeyValueObserver, afterMarshaled, alloc, autorelease, autorelease, awakeFromNib, conformsToProtocol, copy, description, didChangeValue, didChangeValue, didChangeValues, doDispose, equals, forceSkipInit, getAutoContentAccessingProxy, getClassForCoder, getClassForKeyedArchiver, getKeyValueCoder, getObservationInfo, hash, hashCode, init, isEqual, isKindOfClass, isMemberOfClass, mutableCopy, performSelector, performSelector, performSelector, performSelector, performSelector, performSelector, performSelector, performSelectorInBackground, performSelectorOnMainThread, performSelectorOnMainThread, performSelectorV, performSelectorV, performSelectorV, release, release, removeKeyValueObserver, removeKeyValueObservers, respondsToSelector, retain, retain, retainCount, setObservationInfo, toString, willChangeValue, willChangeValue, willChangeValuesMethods inherited from class org.robovm.objc.ObjCObject
addStrongRef, dispose, dispose, finalize, getAssociatedObject, getObjCClass, getPeerObject, getSuper, initObject, logRetainRelease, removeStrongRef, retainCustomObjectFromCb, setAssociatedObject, toObjCObject, toObjCObject, updateStrongRefMethods inherited from class org.robovm.rt.bro.NativeObject
as, getHandle, setHandle
-
Constructor Details
-
MPSGraph
public MPSGraph() -
MPSGraph
-
MPSGraph
-
-
Method Details
-
getOptions
-
setOptions
-
getPlaceholderTensors
-
compile
public MPSGraphExecutable compile(MPSGraphDevice device, NSDictionary<MPSGraphTensor,MPSGraphShapedType> feeds, NSArray<MPSGraphTensor> targetTensors, NSArray<MPSGraphOperation> targetOperations, MPSGraphCompilationDescriptor compilationDescriptor)- Since:
- Available in iOS 15.0 and later.
-
run
public NSDictionary<MPSGraphTensor,MPSGraphTensorData> run(NSDictionary<MPSGraphTensor,MPSGraphTensorData> feeds, NSArray<MPSGraphTensor> targetTensors, NSArray<MPSGraphOperation> targetOperations) -
run
public NSDictionary<MPSGraphTensor,MPSGraphTensorData> run(MTLCommandQueue commandQueue, NSDictionary<MPSGraphTensor,MPSGraphTensorData> feeds, NSArray<MPSGraphTensor> targetTensors, NSArray<MPSGraphOperation> targetOperations) -
run
public void run(MTLCommandQueue commandQueue, NSDictionary<MPSGraphTensor,MPSGraphTensorData> feeds, NSArray<MPSGraphOperation> targetOperations, NSDictionary<MPSGraphTensor,MPSGraphTensorData> resultsDictionary) -
runAsync
public NSDictionary<MPSGraphTensor,MPSGraphTensorData> runAsync(NSDictionary<MPSGraphTensor,MPSGraphTensorData> feeds, NSArray<MPSGraphTensor> targetTensors, NSArray<MPSGraphOperation> targetOperations, MPSGraphExecutionDescriptor executionDescriptor) -
runAsync
public NSDictionary<MPSGraphTensor,MPSGraphTensorData> runAsync(MTLCommandQueue commandQueue, NSDictionary<MPSGraphTensor,MPSGraphTensorData> feeds, NSArray<MPSGraphTensor> targetTensors, NSArray<MPSGraphOperation> targetOperations, MPSGraphExecutionDescriptor executionDescriptor) -
runAsync
public void runAsync(MTLCommandQueue commandQueue, NSDictionary<MPSGraphTensor,MPSGraphTensorData> feeds, NSArray<MPSGraphOperation> targetOperations, NSDictionary<MPSGraphTensor,MPSGraphTensorData> resultsDictionary, MPSGraphExecutionDescriptor executionDescriptor) -
encodeToCommandBuffer
public NSDictionary<MPSGraphTensor,MPSGraphTensorData> encodeToCommandBuffer(MPSCommandBuffer commandBuffer, NSDictionary<MPSGraphTensor,MPSGraphTensorData> feeds, NSArray<MPSGraphTensor> targetTensors, NSArray<MPSGraphOperation> targetOperations, MPSGraphExecutionDescriptor executionDescriptor) -
encodeToCommandBuffer
public void encodeToCommandBuffer(MPSCommandBuffer commandBuffer, NSDictionary<MPSGraphTensor,MPSGraphTensorData> feeds, NSArray<MPSGraphOperation> targetOperations, NSDictionary<MPSGraphTensor,MPSGraphTensorData> resultsDictionary, MPSGraphExecutionDescriptor executionDescriptor) -
gradientForPrimaryTensor
public NSDictionary<MPSGraphTensor,MPSGraphTensor> gradientForPrimaryTensor(MPSGraphTensor primaryTensor, NSArray<MPSGraphTensor> tensors, String name) -
reLU
-
reLUGradient
-
sigmoid
-
sigmoidGradient
-
softMax
-
softMaxGradient
public MPSGraphTensor softMaxGradient(MPSGraphTensor gradient, MPSGraphTensor source, long axis, String name) -
leakyReLU
- Since:
- Available in iOS 15.0 and later.
-
leakyReLU
- Since:
- Available in iOS 15.0 and later.
-
leakyReLU
public MPSGraphTensor leakyReLU(MPSGraphTensor gradient, MPSGraphTensor source, MPSGraphTensor alphaTensor, String name)- Since:
- Available in iOS 15.0 and later.
-
identity
-
exponent
-
exponentBase2
-
exponentBase10
-
logarithm
-
logarithmBase2
-
logarithmBase10
-
square
-
squareRoot
-
reverseSquareRoot
-
reciprocal
-
absolute
-
negative
-
sign
-
signbit
-
ceil
-
floor
-
round
-
rint
-
sin
-
cos
-
tan
-
sinh
-
cosh
-
tanh
-
asin
-
acos
-
atan
-
asinh
-
acosh
-
atanh
-
not
-
isInfinite
-
isFinite
-
isNaN
-
erf
-
addition
public MPSGraphTensor addition(MPSGraphTensor primaryTensor, MPSGraphTensor secondaryTensor, String name) -
subtraction
public MPSGraphTensor subtraction(MPSGraphTensor primaryTensor, MPSGraphTensor secondaryTensor, String name) -
multiplication
public MPSGraphTensor multiplication(MPSGraphTensor primaryTensor, MPSGraphTensor secondaryTensor, String name) -
division
public MPSGraphTensor division(MPSGraphTensor primaryTensor, MPSGraphTensor secondaryTensor, String name) -
modulo
public MPSGraphTensor modulo(MPSGraphTensor primaryTensor, MPSGraphTensor secondaryTensor, String name) -
power
public MPSGraphTensor power(MPSGraphTensor primaryTensor, MPSGraphTensor secondaryTensor, String name) -
minimum
public MPSGraphTensor minimum(MPSGraphTensor primaryTensor, MPSGraphTensor secondaryTensor, String name) -
maximum
public MPSGraphTensor maximum(MPSGraphTensor primaryTensor, MPSGraphTensor secondaryTensor, String name) -
minimumWithNaNPropagation
public MPSGraphTensor minimumWithNaNPropagation(MPSGraphTensor primaryTensor, MPSGraphTensor secondaryTensor, String name)- Since:
- Available in iOS 15.0 and later.
-
maximumWithNaNPropagation
public MPSGraphTensor maximumWithNaNPropagation(MPSGraphTensor primaryTensor, MPSGraphTensor secondaryTensor, String name)- Since:
- Available in iOS 15.0 and later.
-
equal
public MPSGraphTensor equal(MPSGraphTensor primaryTensor, MPSGraphTensor secondaryTensor, String name) -
notEqual
public MPSGraphTensor notEqual(MPSGraphTensor primaryTensor, MPSGraphTensor secondaryTensor, String name) -
lessThan
public MPSGraphTensor lessThan(MPSGraphTensor primaryTensor, MPSGraphTensor secondaryTensor, String name) -
lessThanOrEqual
public MPSGraphTensor lessThanOrEqual(MPSGraphTensor primaryTensor, MPSGraphTensor secondaryTensor, String name) -
greaterThan
public MPSGraphTensor greaterThan(MPSGraphTensor primaryTensor, MPSGraphTensor secondaryTensor, String name) -
greaterThanOrEqual
public MPSGraphTensor greaterThanOrEqual(MPSGraphTensor primaryTensor, MPSGraphTensor secondaryTensor, String name) -
logicalAND
public MPSGraphTensor logicalAND(MPSGraphTensor primaryTensor, MPSGraphTensor secondaryTensor, String name) -
logicalOR
public MPSGraphTensor logicalOR(MPSGraphTensor primaryTensor, MPSGraphTensor secondaryTensor, String name) -
logicalNAND
public MPSGraphTensor logicalNAND(MPSGraphTensor primaryTensor, MPSGraphTensor secondaryTensor, String name) -
logicalNOR
public MPSGraphTensor logicalNOR(MPSGraphTensor primaryTensor, MPSGraphTensor secondaryTensor, String name) -
logicalXOR
public MPSGraphTensor logicalXOR(MPSGraphTensor primaryTensor, MPSGraphTensor secondaryTensor, String name) -
logicalXNOR
public MPSGraphTensor logicalXNOR(MPSGraphTensor primaryTensor, MPSGraphTensor secondaryTensor, String name) -
atan2
public MPSGraphTensor atan2(MPSGraphTensor primaryTensor, MPSGraphTensor secondaryTensor, String name) -
select
public MPSGraphTensor select(MPSGraphTensor predicateTensor, MPSGraphTensor truePredicateTensor, MPSGraphTensor falseSelectTensor, String name) -
clamp
public MPSGraphTensor clamp(MPSGraphTensor tensor, MPSGraphTensor minValueTensor, MPSGraphTensor maxValueTensor, String name) -
divisionNoNaN
public MPSGraphTensor divisionNoNaN(MPSGraphTensor primaryTensor, MPSGraphTensor secondaryTensor, String name) -
floorModulo
public MPSGraphTensor floorModulo(MPSGraphTensor primaryTensor, MPSGraphTensor secondaryTensor, String name) -
convolution2D
public MPSGraphTensor convolution2D(MPSGraphTensor source, MPSGraphTensor weights, MPSGraphConvolution2DOpDescriptor descriptor, String name) -
convolution2DDataGradient
public MPSGraphTensor convolution2DDataGradient(MPSGraphTensor incomingGradient, MPSGraphTensor weights, NSArray<NSNumber> outputShape, MPSGraphConvolution2DOpDescriptor forwardConvolutionDescriptor, String name) -
convolution2DDataGradient
public MPSGraphTensor convolution2DDataGradient(MPSGraphTensor gradient, MPSGraphTensor weights, MPSGraphTensor outputShapeTensor, MPSGraphConvolution2DOpDescriptor forwardConvolutionDescriptor, String name)- Since:
- Available in iOS 15.0 and later.
-
convolution2DWeightsGradient
public MPSGraphTensor convolution2DWeightsGradient(MPSGraphTensor incomingGradient, MPSGraphTensor source, NSArray<NSNumber> outputShape, MPSGraphConvolution2DOpDescriptor forwardConvolutionDescriptor, String name) -
convolution2DWeightsGradient
public MPSGraphTensor convolution2DWeightsGradient(MPSGraphTensor gradient, MPSGraphTensor source, MPSGraphTensor outputShapeTensor, MPSGraphConvolution2DOpDescriptor forwardConvolutionDescriptor, String name)- Since:
- Available in iOS 15.0 and later.
-
convolutionTranspose2D
public MPSGraphTensor convolutionTranspose2D(MPSGraphTensor source, MPSGraphTensor weights, NSArray<NSNumber> outputShape, MPSGraphConvolution2DOpDescriptor descriptor, String name) -
convolutionTranspose2D
public MPSGraphTensor convolutionTranspose2D(MPSGraphTensor source, MPSGraphTensor weights, MPSGraphTensor outputShape, MPSGraphConvolution2DOpDescriptor descriptor, String name)- Since:
- Available in iOS 15.0 and later.
-
convolutionTranspose2DDataGradient
public MPSGraphTensor convolutionTranspose2DDataGradient(MPSGraphTensor incomingGradient, MPSGraphTensor weights, NSArray<NSNumber> outputShape, MPSGraphConvolution2DOpDescriptor forwardConvolutionDescriptor, String name) -
convolutionTranspose2DDataGradient
public MPSGraphTensor convolutionTranspose2DDataGradient(MPSGraphTensor incomingGradient, MPSGraphTensor weights, MPSGraphTensor outputShape, MPSGraphConvolution2DOpDescriptor forwardConvolutionDescriptor, String name)- Since:
- Available in iOS 15.0 and later.
-
convolutionTranspose2DWeightsGradient
public MPSGraphTensor convolutionTranspose2DWeightsGradient(MPSGraphTensor incomingGradientTensor, MPSGraphTensor source, NSArray<NSNumber> outputShape, MPSGraphConvolution2DOpDescriptor forwardConvolutionDescriptor, String name) -
convolutionTranspose2DWeightsGradient
public MPSGraphTensor convolutionTranspose2DWeightsGradient(MPSGraphTensor incomingGradientTensor, MPSGraphTensor source, MPSGraphTensor outputShape, MPSGraphConvolution2DOpDescriptor forwardConvolutionDescriptor, String name)- Since:
- Available in iOS 15.0 and later.
-
controlDependency
public NSArray<MPSGraphTensor> controlDependency(NSArray<MPSGraphOperation> operations, Block0<NSArray<MPSGraphTensor>> dependentBlock, String name) -
doIf
public NSArray<MPSGraphTensor> doIf(MPSGraphTensor predicateTensor, Block0<NSArray<MPSGraphTensor>> thenBlock, Block0<NSArray<MPSGraphTensor>> elseBlock, String name) -
whileLoop
public NSArray<MPSGraphTensor> whileLoop(NSArray<MPSGraphTensor> initialInputs, Block2<NSArray<MPSGraphTensor>,NSMutableArray<MPSGraphTensor>,MPSGraphTensor> before, Block1<NSArray<MPSGraphTensor>,NSArray<MPSGraphTensor>> after, String name) -
forLoop
public NSArray<MPSGraphTensor> forLoop(MPSGraphTensor lowerBound, MPSGraphTensor upperBound, MPSGraphTensor step, NSArray<MPSGraphTensor> initialBodyArguments, Block2<MPSGraphTensor,NSArray<MPSGraphTensor>,NSArray<MPSGraphTensor>> body, String name) -
forLoop
public NSArray<MPSGraphTensor> forLoop(MPSGraphTensor numberOfIterations, NSArray<MPSGraphTensor> initialBodyArguments, Block2<MPSGraphTensor,NSArray<MPSGraphTensor>,NSArray<MPSGraphTensor>> body, String name) -
depthwiseConvolution2D
public MPSGraphTensor depthwiseConvolution2D(MPSGraphTensor source, MPSGraphTensor weights, MPSGraphDepthwiseConvolution2DOpDescriptor descriptor, String name) -
depthwiseConvolution2DDataGradient
public MPSGraphTensor depthwiseConvolution2DDataGradient(MPSGraphTensor incomingGradient, MPSGraphTensor weights, NSArray<NSNumber> outputShape, MPSGraphDepthwiseConvolution2DOpDescriptor descriptor, String name) -
depthwiseConvolution2DWeightsGradient
public MPSGraphTensor depthwiseConvolution2DWeightsGradient(MPSGraphTensor incomingGradient, MPSGraphTensor source, NSArray<NSNumber> outputShape, MPSGraphDepthwiseConvolution2DOpDescriptor descriptor, String name) -
depthwiseConvolution3D
public MPSGraphTensor depthwiseConvolution3D(MPSGraphTensor source, MPSGraphTensor weights, MPSGraphDepthwiseConvolution3DOpDescriptor descriptor, String name)- Since:
- Available in iOS 15.0 and later.
-
depthwiseConvolution3DDataGradient
public MPSGraphTensor depthwiseConvolution3DDataGradient(MPSGraphTensor incomingGradient, MPSGraphTensor weights, NSArray<NSNumber> outputShape, MPSGraphDepthwiseConvolution3DOpDescriptor descriptor, String name)- Since:
- Available in iOS 15.0 and later.
-
depthwiseConvolution3DWeightsGradient
public MPSGraphTensor depthwiseConvolution3DWeightsGradient(MPSGraphTensor incomingGradient, MPSGraphTensor source, NSArray<NSNumber> outputShape, MPSGraphDepthwiseConvolution3DOpDescriptor descriptor, String name) -
gatherND
public MPSGraphTensor gatherND(MPSGraphTensor updatesTensor, MPSGraphTensor indicesTensor, long batchDimensions, String name) -
gather
public MPSGraphTensor gather(MPSGraphTensor updatesTensor, MPSGraphTensor indicesTensor, long axis, long batchDimensions, String name) -
gatherAlongAxis
public MPSGraphTensor gatherAlongAxis(long axis, MPSGraphTensor updatesTensor, MPSGraphTensor indicesTensor, String name)- Since:
- Available in iOS 15.4 and later.
-
gatherAlongAxisTensor
public MPSGraphTensor gatherAlongAxisTensor(MPSGraphTensor axisTensor, MPSGraphTensor updatesTensor, MPSGraphTensor indicesTensor, String name)- Since:
- Available in iOS 15.4 and later.
-
bandPart
public MPSGraphTensor bandPart(MPSGraphTensor inputTensor, long numLower, long numUpper, String name) -
bandPart
public MPSGraphTensor bandPart(MPSGraphTensor inputTensor, MPSGraphTensor numLowerTensor, MPSGraphTensor numUpperTensor, String name) -
softMaxCrossEntropy
public MPSGraphTensor softMaxCrossEntropy(MPSGraphTensor sourceTensor, MPSGraphTensor labelsTensor, long axis, MPSGraphLossReductionType reductionType, String name) -
softMaxCrossEntropyGradient
public MPSGraphTensor softMaxCrossEntropyGradient(MPSGraphTensor gradientTensor, MPSGraphTensor sourceTensor, MPSGraphTensor labelsTensor, long axis, MPSGraphLossReductionType reductionType, String name) -
matrixMultiplication
public MPSGraphTensor matrixMultiplication(MPSGraphTensor primaryTensor, MPSGraphTensor secondaryTensor, String name) -
sparseTensor
public MPSGraphTensor sparseTensor(MPSGraphSparseStorageType sparseStorageType, NSArray<MPSGraphTensor> inputTensorArray, NSArray<NSNumber> shape, MPSDataType dataType, String name)- Since:
- Available in iOS 15.0 and later.
-
sparseTensor
public MPSGraphTensor sparseTensor(MPSGraphCreateSparseOpDescriptor sparseDescriptor, NSArray<MPSGraphTensor> inputTensorArray, NSArray<NSNumber> shape, String name)- Since:
- Available in iOS 15.0 and later.
-
placeholder
-
placeholder
-
constant
-
constant
-
constant
-
variable
public MPSGraphTensor variable(NSData data, NSArray<NSNumber> shape, MPSDataType dataType, String name) -
readVariable
-
assignVariable
public MPSGraphOperation assignVariable(MPSGraphTensor variable, MPSGraphTensor tensor, String name) -
mean
-
variance
public MPSGraphTensor variance(MPSGraphTensor tensor, MPSGraphTensor meanTensor, NSArray<NSNumber> axes, String name) -
variance
-
normalization
public MPSGraphTensor normalization(MPSGraphTensor tensor, MPSGraphTensor mean, MPSGraphTensor variance, MPSGraphTensor gamma, MPSGraphTensor beta, float epsilon, String name) -
normalizationGammaGradient
public MPSGraphTensor normalizationGammaGradient(MPSGraphTensor incomingGradientTensor, MPSGraphTensor sourceTensor, MPSGraphTensor meanTensor, MPSGraphTensor varianceTensor, NSArray<NSNumber> axes, float epsilon, String name) -
normalizationBetaGradient
public MPSGraphTensor normalizationBetaGradient(MPSGraphTensor incomingGradientTensor, MPSGraphTensor sourceTensor, NSArray<NSNumber> axes, String name) -
normalizationGradient
public MPSGraphTensor normalizationGradient(MPSGraphTensor incomingGradientTensor, MPSGraphTensor sourceTensor, MPSGraphTensor meanTensor, MPSGraphTensor varianceTensor, MPSGraphTensor gamma, MPSGraphTensor gammaGradient, MPSGraphTensor betaGradient, NSArray<NSNumber> axes, float epsilon, String name) -
oneHot
public MPSGraphTensor oneHot(MPSGraphTensor indicesTensor, long depth, long axis, MPSDataType dataType, double onValue, double offValue, String name) -
oneHot
public MPSGraphTensor oneHot(MPSGraphTensor indicesTensor, long depth, MPSDataType dataType, double onValue, double offValue, String name) -
oneHot
public MPSGraphTensor oneHot(MPSGraphTensor indicesTensor, long depth, long axis, MPSDataType dataType, String name) -
oneHot
-
oneHot
public MPSGraphTensor oneHot(MPSGraphTensor indicesTensor, long depth, MPSDataType dataType, String name) -
oneHot
-
stochasticGradientDescent
public MPSGraphTensor stochasticGradientDescent(MPSGraphTensor learningRateTensor, MPSGraphTensor valuesTensor, MPSGraphTensor gradientTensor, String name) -
applyStochasticGradientDescent
public MPSGraphOperation applyStochasticGradientDescent(MPSGraphTensor learningRateTensor, MPSGraphVariableOp variable, MPSGraphTensor gradientTensor, String name) -
maxPooling2D
public MPSGraphTensor maxPooling2D(MPSGraphTensor source, MPSGraphPooling2DOpDescriptor descriptor, String name) -
maxPooling2DReturnIndices
public NSArray<MPSGraphTensor> maxPooling2DReturnIndices(MPSGraphTensor source, MPSGraphPooling2DOpDescriptor descriptor, String name)- Since:
- Available in iOS 15.3 and later.
-
maxPooling2DGradient
public MPSGraphTensor maxPooling2DGradient(MPSGraphTensor gradient, MPSGraphTensor source, MPSGraphPooling2DOpDescriptor descriptor, String name) -
avgPooling2D
public MPSGraphTensor avgPooling2D(MPSGraphTensor source, MPSGraphPooling2DOpDescriptor descriptor, String name) -
avgPooling2D
public MPSGraphTensor avgPooling2D(MPSGraphTensor gradient, MPSGraphTensor source, MPSGraphPooling2DOpDescriptor descriptor, String name) -
maxPooling4D
public MPSGraphTensor maxPooling4D(MPSGraphTensor source, MPSGraphPooling4DOpDescriptor descriptor, String name)- Since:
- Available in iOS 15.0 and later.
-
maxPooling4DReturnIndices
public NSArray<MPSGraphTensor> maxPooling4DReturnIndices(MPSGraphTensor source, MPSGraphPooling4DOpDescriptor descriptor, String name)- Since:
- Available in iOS 15.3 and later.
-
maxPooling4DGradient
public MPSGraphTensor maxPooling4DGradient(MPSGraphTensor gradient, MPSGraphTensor source, MPSGraphPooling4DOpDescriptor descriptor, String name)- Since:
- Available in iOS 15.0 and later.
-
avgPooling4D
public MPSGraphTensor avgPooling4D(MPSGraphTensor source, MPSGraphPooling4DOpDescriptor descriptor, String name)- Since:
- Available in iOS 15.0 and later.
-
avgPooling4DGradient
public MPSGraphTensor avgPooling4DGradient(MPSGraphTensor gradient, MPSGraphTensor source, MPSGraphPooling4DOpDescriptor descriptor, String name)- Since:
- Available in iOS 15.0 and later.
-
L2NormPooling4D
public MPSGraphTensor L2NormPooling4D(MPSGraphTensor source, MPSGraphPooling4DOpDescriptor descriptor, String name)- Since:
- Available in iOS 15.0 and later.
-
L2NormPooling4DGradient
public MPSGraphTensor L2NormPooling4DGradient(MPSGraphTensor gradient, MPSGraphTensor source, MPSGraphPooling4DOpDescriptor descriptor, String name)- Since:
- Available in iOS 15.0 and later.
-
randomPhiloxStateTensor
-
randomPhiloxStateTensor
public MPSGraphTensor randomPhiloxStateTensor(long counterLow, long counterHigh, long key, String name) -
randomTensor
public MPSGraphTensor randomTensor(NSArray<NSNumber> shape, MPSGraphRandomOpDescriptor descriptor, String name) -
randomTensor
public MPSGraphTensor randomTensor(MPSGraphTensor shapeTensor, MPSGraphRandomOpDescriptor descriptor, String name) -
randomTensor
public MPSGraphTensor randomTensor(NSArray<NSNumber> shape, MPSGraphRandomOpDescriptor descriptor, long seed, String name) -
randomTensor
public MPSGraphTensor randomTensor(MPSGraphTensor shapeTensor, MPSGraphRandomOpDescriptor descriptor, long seed, String name) -
randomTensor
public NSArray<MPSGraphTensor> randomTensor(NSArray<NSNumber> shape, MPSGraphRandomOpDescriptor descriptor, MPSGraphTensor state, String name) -
randomTensor
public NSArray<MPSGraphTensor> randomTensor(MPSGraphTensor shapeTensor, MPSGraphRandomOpDescriptor descriptor, MPSGraphTensor state, String name) -
randomUniformTensor
-
randomUniformTensor
-
randomUniformTensor
-
randomUniformTensor
-
randomUniformTensor
public NSArray<MPSGraphTensor> randomUniformTensor(NSArray<NSNumber> shape, MPSGraphTensor state, String name) -
randomUniformTensor
public NSArray<MPSGraphTensor> randomUniformTensor(MPSGraphTensor shapeTensor, MPSGraphTensor state, String name) -
dropout
-
dropout
-
reductionSum
-
reductionSum
-
reductionMaximum
-
reductionMaximum
-
reductionMinimum
-
reductionMinimum
-
reductionMaximumPropagateNaN
-
reductionMaximumPropagateNaN
public MPSGraphTensor reductionMaximumPropagateNaN(MPSGraphTensor tensor, NSArray<NSNumber> axes, String name) -
reductionMinimumPropagateNa
-
reductionMinimumPropagateNaN
public MPSGraphTensor reductionMinimumPropagateNaN(MPSGraphTensor tensor, NSArray<NSNumber> axes, String name) -
reductionProduct
-
reductionProduct
-
reductionArgMaximum
- Since:
- Available in iOS 15.0 and later.
-
reductionArgMinimum
- Since:
- Available in iOS 15.0 and later.
-
reductionAnd
- Since:
- Available in iOS 15.3 and later.
-
reductionAnd
- Since:
- Available in iOS 15.3 and later.
-
reductionOr
- Since:
- Available in iOS 15.3 and later.
-
reductionOr
- Since:
- Available in iOS 15.3 and later.
-
resizeTensor
public MPSGraphTensor resizeTensor(MPSGraphTensor imagesTensor, NSArray<NSNumber> size, MPSGraphResizeMode mode, boolean centerResult, boolean alignCorners, MPSGraphTensorNamedDataLayout layout, String name) -
resizeTensor
public MPSGraphTensor resizeTensor(MPSGraphTensor imagesTensor, MPSGraphTensor size, MPSGraphResizeMode mode, boolean centerResult, boolean alignCorners, MPSGraphTensorNamedDataLayout layout, String name)- Since:
- Available in iOS 15.0 and later.
-
resize
public MPSGraphTensor resize(MPSGraphTensor gradient, MPSGraphTensor input, MPSGraphResizeMode mode, boolean centerResult, boolean alignCorners, MPSGraphTensorNamedDataLayout layout, String name) -
scatterND
public MPSGraphTensor scatterND(MPSGraphTensor updatesTensor, MPSGraphTensor indicesTensor, NSArray<NSNumber> shape, long batchDimensions, MPSGraphScatterMode mode, String name) -
scatterND
public MPSGraphTensor scatterND(MPSGraphTensor updatesTensor, MPSGraphTensor indicesTensor, NSArray<NSNumber> shape, long batchDimensions, String name) -
scatterND
public MPSGraphTensor scatterND(MPSGraphTensor dataTensor, MPSGraphTensor updatesTensor, MPSGraphTensor indicesTensor, long batchDimensions, MPSGraphScatterMode mode, String name)- Since:
- Available in iOS 15.0 and later.
-
scatter
public MPSGraphTensor scatter(MPSGraphTensor updatesTensor, MPSGraphTensor indicesTensor, NSArray<NSNumber> shape, long axis, MPSGraphScatterMode mode, String name)- Since:
- Available in iOS 15.0 and later.
-
scatter
public MPSGraphTensor scatter(MPSGraphTensor dataTensor, MPSGraphTensor updatesTensor, MPSGraphTensor indicesTensor, long axis, MPSGraphScatterMode mode, String name)- Since:
- Available in iOS 15.0 and later.
-
scatterAlongAxis
public MPSGraphTensor scatterAlongAxis(long axis, MPSGraphTensor updatesTensor, MPSGraphTensor indicesTensor, NSArray<NSNumber> shape, MPSGraphScatterMode mode, String name)- Since:
- Available in iOS 15.4 and later.
-
scatterAlongAxisTensor
public MPSGraphTensor scatterAlongAxisTensor(MPSGraphTensor axisTensor, MPSGraphTensor updatesTensor, MPSGraphTensor indicesTensor, NSArray<NSNumber> shape, MPSGraphScatterMode mode, String name)- Since:
- Available in iOS 15.4 and later.
-
scatterAlongAxis
public MPSGraphTensor scatterAlongAxis(long axis, MPSGraphTensor dataTensor, MPSGraphTensor updatesTensor, MPSGraphTensor indicesTensor, MPSGraphScatterMode mode, String name)- Since:
- Available in iOS 15.4 and later.
-
scatterAlongAxisTensor
public MPSGraphTensor scatterAlongAxisTensor(MPSGraphTensor axisTensor, MPSGraphTensor dataTensor, MPSGraphTensor updatesTensor, MPSGraphTensor indicesTensor, MPSGraphScatterMode mode, String name)- Since:
- Available in iOS 15.4 and later.
-
stencil
public MPSGraphTensor stencil(MPSGraphTensor source, MPSGraphTensor weights, MPSGraphStencilOpDescriptor descriptor, String name) -
reshapeTensor
-
reshapeTensor
public MPSGraphTensor reshapeTensor(MPSGraphTensor tensor, MPSGraphTensor shapeTensor, String name)- Since:
- Available in iOS 15.0 and later.
-
transposeTensor
public MPSGraphTensor transposeTensor(MPSGraphTensor tensor, long dimensionIndex, long dimensionIndex2, String name) -
sliceTensor
public MPSGraphTensor sliceTensor(MPSGraphTensor tensor, long dimensionIndex, long start, long length, String name) -
sliceTensor
public MPSGraphTensor sliceTensor(MPSGraphTensor tensor, NSArray<NSNumber> starts, NSArray<NSNumber> ends, NSArray<NSNumber> strides, String name) -
sliceTensor
public MPSGraphTensor sliceTensor(MPSGraphTensor tensor, NSArray<NSNumber> starts, NSArray<NSNumber> ends, NSArray<NSNumber> strides, int startMask, int endMask, int squeezeMask, String name) -
sliceGradientTensor
public MPSGraphTensor sliceGradientTensor(MPSGraphTensor inputGradientTensor, MPSGraphTensor fwdInShapeTensor, NSArray<NSNumber> starts, NSArray<NSNumber> ends, NSArray<NSNumber> strides, String name) -
sliceGradientTensor
public MPSGraphTensor sliceGradientTensor(MPSGraphTensor inputGradientTensor, MPSGraphTensor fwdInShapeTensor, NSArray<NSNumber> starts, NSArray<NSNumber> ends, NSArray<NSNumber> strides, int startMask, int endMask, int squeezeMask, String name) -
concatTensor
public MPSGraphTensor concatTensor(MPSGraphTensor tensor, MPSGraphTensor tensor2, long dimensionIndex, String name) -
concatTensors
public MPSGraphTensor concatTensors(NSArray<MPSGraphTensor> tensors, long dimensionIndex, String name) -
concatTensors
public MPSGraphTensor concatTensors(NSArray<MPSGraphTensor> tensors, long dimensionIndex, boolean interleave, String name) -
tileTensor
-
tileGradient
public MPSGraphTensor tileGradient(MPSGraphTensor incomingGradientTensor, MPSGraphTensor sourceTensor, NSArray<NSNumber> multiplier, String name) -
padTensor
public MPSGraphTensor padTensor(MPSGraphTensor tensor, MPSGraphPaddingMode paddingMode, NSArray<NSNumber> leftPadding, NSArray<NSNumber> rightPadding, double constantValue, String name) -
padGradient
public MPSGraphTensor padGradient(MPSGraphTensor incomingGradientTensor, MPSGraphTensor sourceTensor, MPSGraphPaddingMode paddingMode, NSArray<NSNumber> leftPadding, NSArray<NSNumber> rightPadding, String name) -
spaceToDepth2DTensor
public MPSGraphTensor spaceToDepth2DTensor(MPSGraphTensor tensor, MPSGraphTensor widthAxisTensor, MPSGraphTensor heightAxisTensor, MPSGraphTensor depthAxisTensor, long blockSize, boolean usePixelShuffleOrder, String name)- Since:
- Available in iOS 15.0 and later.
-
depthToSpace2DTensor
public MPSGraphTensor depthToSpace2DTensor(MPSGraphTensor tensor, MPSGraphTensor widthAxisTensor, MPSGraphTensor heightAxisTensor, MPSGraphTensor depthAxisTensor, long blockSize, boolean usePixelShuffleOrder, String name)- Since:
- Available in iOS 15.0 and later.
-
spaceToDepth2DTensor
public MPSGraphTensor spaceToDepth2DTensor(MPSGraphTensor tensor, long widthAxis, long heightAxis, long depthAxis, long blockSize, boolean usePixelShuffleOrder, String name)- Since:
- Available in iOS 15.0 and later.
-
depthToSpace2DTensor
public MPSGraphTensor depthToSpace2DTensor(MPSGraphTensor tensor, long widthAxis, long heightAxis, long depthAxis, long blockSize, boolean usePixelShuffleOrder, String name)- Since:
- Available in iOS 15.0 and later.
-
reverseTensor
- Since:
- Available in iOS 15.0 and later.
-
reverseTensor
- Since:
- Available in iOS 15.0 and later.
-
reverseTensor
- Since:
- Available in iOS 15.0 and later.
-
flatten2DTensor
- Since:
- Available in iOS 15.0 and later.
-
flatten2DTensor
public MPSGraphTensor flatten2DTensor(MPSGraphTensor tensor, MPSGraphTensor axisTensor, String name)- Since:
- Available in iOS 15.0 and later.
-
broadcastTensor
- Since:
- Available in iOS 15.0 and later.
-
broadcastTensor
public MPSGraphTensor broadcastTensor(MPSGraphTensor tensor, MPSGraphTensor shapeTensor, String name)- Since:
- Available in iOS 15.0 and later.
-
shapeOfTensor
- Since:
- Available in iOS 15.0 and later.
-
castTensor
- Since:
- Available in iOS 15.0 and later.
-
stackTensors
- Since:
- Available in iOS 15.4 and later.
-
splitTensor
public NSArray<MPSGraphTensor> splitTensor(MPSGraphTensor tensor, NSArray<NSNumber> splitSizes, long axis, String name)- Since:
- Available in iOS 15.4 and later.
-
splitTensor
public NSArray<MPSGraphTensor> splitTensor(MPSGraphTensor tensor, MPSGraphTensor splitSizesTensor, long axis, String name)- Since:
- Available in iOS 15.4 and later.
-
splitTensor
public NSArray<MPSGraphTensor> splitTensor(MPSGraphTensor tensor, long numSplits, long axis, String name)- Since:
- Available in iOS 15.4 and later.
-
squeezeTensor
- Since:
- Available in iOS 15.4 and later.
-
squeezeTensor
- Since:
- Available in iOS 15.4 and later.
-
squeezeTensor
- Since:
- Available in iOS 15.4 and later.
-
squeezeTensor
- Since:
- Available in iOS 15.4 and later.
-
expandDimsOfTensor
- Since:
- Available in iOS 15.4 and later.
-
expandDimsOfTensor
public MPSGraphTensor expandDimsOfTensor(MPSGraphTensor tensor, NSArray<NSNumber> axes, String name)- Since:
- Available in iOS 15.4 and later.
-
expandDimsOfTensor
public MPSGraphTensor expandDimsOfTensor(MPSGraphTensor tensor, MPSGraphTensor axesTensor, String name)- Since:
- Available in iOS 15.4 and later.
-
coordinateAlongAxis
- Since:
- Available in iOS 15.4 and later.
-
coordinateAlongAxisTensor
public MPSGraphTensor coordinateAlongAxisTensor(MPSGraphTensor axisTensor, NSArray<NSNumber> shape, String name)- Since:
- Available in iOS 15.4 and later.
-
coordinateAlongAxis
- Since:
- Available in iOS 15.4 and later.
-
coordinateAlongAxisTensor
public MPSGraphTensor coordinateAlongAxisTensor(MPSGraphTensor axisTensor, MPSGraphTensor shapeTensor, String name)- Since:
- Available in iOS 15.4 and later.
-
topK
-
topK
-
topK
-
topK
public MPSGraphTensor topK(MPSGraphTensor gradient, MPSGraphTensor source, MPSGraphTensor kTensor, String name)
-