Package org.robovm.apple.mlcompute
Class MLCTensor
java.lang.Object
org.robovm.rt.bro.NativeObject
org.robovm.objc.ObjCObject
org.robovm.apple.foundation.NSObject
org.robovm.apple.mlcompute.MLCTensor
- All Implemented Interfaces:
NSObjectProtocol,ObjCProtocol
public class MLCTensor extends NSObject
- Since:
- Available in iOS 14.0 and later.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMLCTensor.MLCTensorPtrNested 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 protectedMLCTensor()MLCTensor(long sequenceLength, long featureChannelCount, long batchSize)MLCTensor(long width, long height, long featureChannelCount, long batchSize)MLCTensor(long width, long height, long featureChannelCount, long batchSize, float fillData, MLCDataType dataType)MLCTensor(long width, long height, long featureChannelCount, long batchSize, MLCRandomInitializerType randomInitializerType)MLCTensor(long width, long height, long featureChannelCount, long batchSize, MLCTensorData data)MLCTensor(long width, long height, long featureChannelCount, long batchSize, MLCTensorData data, MLCDataType dataType)MLCTensor(long sequenceLength, long featureChannelCount, long batchSize, MLCRandomInitializerType randomInitializerType)MLCTensor(long sequenceLength, long featureChannelCount, long batchSize, MLCTensorData data)MLCTensor(NSArray<NSNumber> shape)MLCTensor(NSArray<NSNumber> sequenceLengths, boolean sortedSequences, long featureChannelCount, long batchSize, MLCRandomInitializerType randomInitializerType)MLCTensor(NSArray<NSNumber> sequenceLengths, boolean sortedSequences, long featureChannelCount, long batchSize, MLCTensorData data)MLCTensor(NSArray<NSNumber> shape, NSNumber fillData, MLCDataType dataType)MLCTensor(NSArray<NSNumber> shape, MLCDataType dataType)MLCTensor(NSArray<NSNumber> shape, MLCRandomInitializerType randomInitializerType)MLCTensor(NSArray<NSNumber> shape, MLCRandomInitializerType randomInitializerType, MLCDataType dataType)MLCTensor(NSArray<NSNumber> shape, MLCTensorData data, MLCDataType dataType)protectedMLCTensor(NSObject.Handle h, long handle)protectedMLCTensor(NSObject.SkipInit skipInit)MLCTensor(MLCTensorDescriptor tensorDescriptor)MLCTensor(MLCTensorDescriptor tensorDescriptor, NSNumber fillData)MLCTensor(MLCTensorDescriptor tensorDescriptor, MLCRandomInitializerType randomInitializerType)MLCTensor(MLCTensorDescriptor tensorDescriptor, MLCTensorData data) -
Method Summary
Modifier and Type Method Description booleanbindAndWriteData(MLCTensorData data, MLCDevice device)booleanbindOptimizerData(NSArray<MLCTensorData> data, NSArray<MLCTensorOptimizerDeviceData> deviceData)booleancopyData(VoidPtr bytes, long length, boolean synchronizeWithDevice)protected static longcreate(long sequenceLength, long featureChannelCount, long batchSize)protected static longcreate(long width, long height, long featureChannelCount, long batchSize)protected static longcreate(long width, long height, long featureChannelCount, long batchSize, float fillData, MLCDataType dataType)protected static longcreate(long width, long height, long featureChannelCount, long batchSize, MLCRandomInitializerType randomInitializerType)protected static longcreate(long width, long height, long featureChannelCount, long batchSize, MLCTensorData data)protected static longcreate(long width, long height, long featureChannelCount, long batchSize, MLCTensorData data, MLCDataType dataType)protected static longcreate(long sequenceLength, long featureChannelCount, long batchSize, MLCRandomInitializerType randomInitializerType)protected static longcreate(long sequenceLength, long featureChannelCount, long batchSize, MLCTensorData data)protected static longcreate(NSArray<NSNumber> shape)protected static longcreate(NSArray<NSNumber> sequenceLengths, boolean sortedSequences, long featureChannelCount, long batchSize, MLCRandomInitializerType randomInitializerType)protected static longcreate(NSArray<NSNumber> sequenceLengths, boolean sortedSequences, long featureChannelCount, long batchSize, MLCTensorData data)protected static longcreate(NSArray<NSNumber> shape, NSNumber fillData, MLCDataType dataType)protected static longcreate(NSArray<NSNumber> shape, MLCDataType dataType)protected static longcreate(NSArray<NSNumber> shape, MLCRandomInitializerType randomInitializerType)protected static longcreate(NSArray<NSNumber> shape, MLCRandomInitializerType randomInitializerType, MLCDataType dataType)protected static longcreate(NSArray<NSNumber> shape, MLCTensorData data, MLCDataType dataType)protected static longcreate(MLCTensorDescriptor tensorDescriptor)protected static longcreate(MLCTensorDescriptor tensorDescriptor, NSNumber fillData)protected static longcreate(MLCTensorDescriptor tensorDescriptor, MLCRandomInitializerType randomInitializerType)protected static longcreate(MLCTensorDescriptor tensorDescriptor, MLCTensorData data)NSDatagetData()MLCTensorDescriptorgetDescriptor()MLCDevicegetDevice()StringgetLabel()NSArray<MLCTensorData>getOptimizerData()NSArray<MLCTensorOptimizerDeviceData>getOptimizerDeviceData()longgetTensorID()booleanhasValidNumerics()voidsetLabel(String v)booleansynchronizeData()booleansynchronizeOptimizerData()MLCTensortensorByDequantizingToType(MLCDataType type, MLCTensor scale, MLCTensor bias)MLCTensortensorByDequantizingToType(MLCDataType type, MLCTensor scale, MLCTensor bias, long axis)MLCTensortensorByQuantizingToType(MLCDataType type, float scale, long bias)MLCTensortensorByQuantizingToType(MLCDataType type, MLCTensor scale, MLCTensor bias, long axis)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
-
MLCTensor
protected MLCTensor() -
MLCTensor
-
MLCTensor
-
MLCTensor
-
MLCTensor
public MLCTensor(MLCTensorDescriptor tensorDescriptor, MLCRandomInitializerType randomInitializerType) -
MLCTensor
-
MLCTensor
-
MLCTensor
-
MLCTensor
-
MLCTensor
public MLCTensor(NSArray<NSNumber> shape, MLCRandomInitializerType randomInitializerType, MLCDataType dataType) -
MLCTensor
-
MLCTensor
-
MLCTensor
-
MLCTensor
public MLCTensor(long width, long height, long featureChannelCount, long batchSize) -
MLCTensor
public MLCTensor(long width, long height, long featureChannelCount, long batchSize, float fillData, MLCDataType dataType) -
MLCTensor
public MLCTensor(long width, long height, long featureChannelCount, long batchSize, MLCRandomInitializerType randomInitializerType) -
MLCTensor
public MLCTensor(long width, long height, long featureChannelCount, long batchSize, MLCTensorData data) -
MLCTensor
public MLCTensor(long width, long height, long featureChannelCount, long batchSize, MLCTensorData data, MLCDataType dataType) -
MLCTensor
public MLCTensor(long sequenceLength, long featureChannelCount, long batchSize) -
MLCTensor
public MLCTensor(long sequenceLength, long featureChannelCount, long batchSize, MLCRandomInitializerType randomInitializerType) -
MLCTensor
public MLCTensor(long sequenceLength, long featureChannelCount, long batchSize, MLCTensorData data) -
MLCTensor
public MLCTensor(NSArray<NSNumber> sequenceLengths, boolean sortedSequences, long featureChannelCount, long batchSize, MLCRandomInitializerType randomInitializerType) -
MLCTensor
public MLCTensor(NSArray<NSNumber> sequenceLengths, boolean sortedSequences, long featureChannelCount, long batchSize, MLCTensorData data)
-
-
Method Details
-
getTensorID
public long getTensorID() -
getDescriptor
-
getData
-
getLabel
-
setLabel
-
getDevice
-
getOptimizerData
-
getOptimizerDeviceData
-
hasValidNumerics
public boolean hasValidNumerics() -
synchronizeData
public boolean synchronizeData() -
synchronizeOptimizerData
public boolean synchronizeOptimizerData() -
copyData
-
bindAndWriteData
-
bindOptimizerData
public boolean bindOptimizerData(NSArray<MLCTensorData> data, NSArray<MLCTensorOptimizerDeviceData> deviceData) -
tensorByQuantizingToType
- Since:
- Available in iOS 15.0 and later.
-
tensorByQuantizingToType
public MLCTensor tensorByQuantizingToType(MLCDataType type, MLCTensor scale, MLCTensor bias, long axis)- Since:
- Available in iOS 15.0 and later.
-
tensorByDequantizingToType
- Since:
- Available in iOS 15.0 and later.
-
tensorByDequantizingToType
public MLCTensor tensorByDequantizingToType(MLCDataType type, MLCTensor scale, MLCTensor bias, long axis)- Since:
- Available in iOS 15.0 and later.
-
create
-
create
protected static long create(MLCTensorDescriptor tensorDescriptor, MLCRandomInitializerType randomInitializerType) -
create
-
create
-
create
-
create
protected static long create(NSArray<NSNumber> shape, MLCRandomInitializerType randomInitializerType) -
create
protected static long create(NSArray<NSNumber> shape, MLCRandomInitializerType randomInitializerType, MLCDataType dataType) -
create
-
create
-
create
-
create
protected static long create(long width, long height, long featureChannelCount, long batchSize) -
create
protected static long create(long width, long height, long featureChannelCount, long batchSize, float fillData, MLCDataType dataType) -
create
protected static long create(long width, long height, long featureChannelCount, long batchSize, MLCRandomInitializerType randomInitializerType) -
create
protected static long create(long width, long height, long featureChannelCount, long batchSize, MLCTensorData data) -
create
protected static long create(long width, long height, long featureChannelCount, long batchSize, MLCTensorData data, MLCDataType dataType) -
create
protected static long create(long sequenceLength, long featureChannelCount, long batchSize) -
create
protected static long create(long sequenceLength, long featureChannelCount, long batchSize, MLCRandomInitializerType randomInitializerType) -
create
protected static long create(long sequenceLength, long featureChannelCount, long batchSize, MLCTensorData data) -
create
protected static long create(NSArray<NSNumber> sequenceLengths, boolean sortedSequences, long featureChannelCount, long batchSize, MLCRandomInitializerType randomInitializerType) -
create
protected static long create(NSArray<NSNumber> sequenceLengths, boolean sortedSequences, long featureChannelCount, long batchSize, MLCTensorData data)
-