Package apple.mlcompute
Class MLCTensor
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.mlcompute.MLCTensor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Block_accessibilityActivateBlock_ret, NSObject.Block_accessibilityActivationPointBlock_ret, NSObject.Block_accessibilityAttributedHintBlock_ret, NSObject.Block_accessibilityAttributedLabelBlock_ret, NSObject.Block_accessibilityAttributedUserInputLabelsBlock_ret, NSObject.Block_accessibilityAttributedValueBlock_ret, NSObject.Block_accessibilityContainerTypeBlock_ret, NSObject.Block_accessibilityCustomActionsBlock_ret, NSObject.Block_accessibilityCustomRotorsBlock_ret, NSObject.Block_accessibilityDecrementBlock_ret, NSObject.Block_accessibilityElementsBlock_ret, NSObject.Block_accessibilityElementsHiddenBlock_ret, NSObject.Block_accessibilityFrameBlock_ret, NSObject.Block_accessibilityHeaderElementsBlock_ret, NSObject.Block_accessibilityHintBlock_ret, NSObject.Block_accessibilityIdentifierBlock_ret, NSObject.Block_accessibilityIncrementBlock_ret, NSObject.Block_accessibilityLabelBlock_ret, NSObject.Block_accessibilityLanguageBlock_ret, NSObject.Block_accessibilityMagicTapBlock_ret, NSObject.Block_accessibilityNavigationStyleBlock_ret, NSObject.Block_accessibilityPathBlock_ret, NSObject.Block_accessibilityPerformEscapeBlock_ret, NSObject.Block_accessibilityRespondsToUserInteractionBlock_ret, NSObject.Block_accessibilityShouldGroupAccessibilityChildrenBlock_ret, NSObject.Block_accessibilityTextualContextBlock_ret, NSObject.Block_accessibilityTraitsBlock_ret, NSObject.Block_accessibilityUserInputLabelsBlock_ret, NSObject.Block_accessibilityValueBlock_ret, NSObject.Block_accessibilityViewIsModalBlock_ret, NSObject.Block_automationElementsBlock_ret, NSObject.Block_isAccessibilityElementBlock_ret, NSObject.Block_setAccessibilityActivateBlock, NSObject.Block_setAccessibilityActivationPointBlock, NSObject.Block_setAccessibilityAttributedHintBlock, NSObject.Block_setAccessibilityAttributedLabelBlock, NSObject.Block_setAccessibilityAttributedUserInputLabelsBlock, NSObject.Block_setAccessibilityAttributedValueBlock, NSObject.Block_setAccessibilityContainerTypeBlock, NSObject.Block_setAccessibilityCustomActionsBlock, NSObject.Block_setAccessibilityCustomRotorsBlock, NSObject.Block_setAccessibilityDecrementBlock, NSObject.Block_setAccessibilityElementsBlock, NSObject.Block_setAccessibilityElementsHiddenBlock, NSObject.Block_setAccessibilityFrameBlock, NSObject.Block_setAccessibilityHeaderElementsBlock, NSObject.Block_setAccessibilityHintBlock, NSObject.Block_setAccessibilityIdentifierBlock, NSObject.Block_setAccessibilityIncrementBlock, NSObject.Block_setAccessibilityLabelBlock, NSObject.Block_setAccessibilityLanguageBlock, NSObject.Block_setAccessibilityMagicTapBlock, NSObject.Block_setAccessibilityNavigationStyleBlock, NSObject.Block_setAccessibilityPathBlock, NSObject.Block_setAccessibilityPerformEscapeBlock, NSObject.Block_setAccessibilityRespondsToUserInteractionBlock, NSObject.Block_setAccessibilityShouldGroupAccessibilityChildrenBlock, NSObject.Block_setAccessibilityTextualContextBlock, NSObject.Block_setAccessibilityTraitsBlock, NSObject.Block_setAccessibilityUserInputLabelsBlock, NSObject.Block_setAccessibilityValueBlock, NSObject.Block_setAccessibilityViewIsModalBlock, NSObject.Block_setAutomationElementsBlock, NSObject.Block_setIsAccessibilityElementBlock, NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMLCTensor(org.moe.natj.general.Pointer peer)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()Deprecated.static MLCTensoralloc()Deprecated.static MLCTensorallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)Deprecated.static booleanautomaticallyNotifiesObserversForKey(@NotNull java.lang.String key)Deprecated.booleanbindAndWriteDataToDevice(@NotNull MLCTensorData data, @NotNull MLCDevice device)Deprecated.Associates the given data to the tensor.booleanbindOptimizerDataDeviceData(@NotNull NSArray<? extends MLCTensorData> data, @Nullable NSArray<? extends MLCTensorOptimizerDeviceData> deviceData)Deprecated.Associates the given optimizer data and device data buffers to the tensor.static voidcancelPreviousPerformRequestsWithTarget(@NotNull java.lang.Object aTarget)Deprecated.static voidcancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull java.lang.Object aTarget, @NotNull org.moe.natj.objc.SEL aSelector, @Nullable java.lang.Object anArgument)Deprecated.static @NotNull NSArray<java.lang.String>classFallbacksForKeyedArchiver()Deprecated.static @NotNull org.moe.natj.objc.ClassclassForKeyedUnarchiver()Deprecated.booleancopyDataFromDeviceMemoryToBytesLengthSynchronizeWithDevice(@NotNull org.moe.natj.general.ptr.VoidPtr bytes, long length, boolean synchronizeWithDevice)Deprecated.Copy tensor data from device memory to user specified memory Before copying tensor data from device memory, one may need to synchronize the device memory for example when device is the GPU.@NotNull java.lang.ObjectcopyWithZone(@Nullable org.moe.natj.general.ptr.VoidPtr zone)Deprecated.@Nullable NSDatadata()Deprecated.[@property] data The tensor datastatic java.lang.StringdebugDescription_static()Deprecated.static java.lang.Stringdescription_static()Deprecated.@NotNull MLCTensorDescriptordescriptor()Deprecated.[@property] descriptor The tensor descriptor@Nullable MLCDevicedevice()Deprecated.[@property] device The device associated with this tensor.static longhash_static()Deprecated.booleanhasValidNumerics()Deprecated.Returns a Boolean value indicating whether the underlying data has valid floating-point numerics, i.e.MLCTensorinit()Deprecated.static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)Deprecated.static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)Deprecated.static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)Deprecated.static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)Deprecated.static @NotNull NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(@NotNull java.lang.String key)Deprecated.@NotNull java.lang.Stringlabel()Deprecated.[@property] label A string to help identify this object.static MLCTensornew_objc()Deprecated.@NotNull NSArray<? extends MLCTensorData>optimizerData()Deprecated.[@property] optimizer buffers to use if tensor is used as a parameter These are the host side optimizer (momentum and velocity) buffers which developers can query and initialize When customizing optimizer data, the contents of these buffers must be initialized before executing optimizer update for a graph.@NotNull NSArray<? extends MLCTensorOptimizerDeviceData>optimizerDeviceData()Deprecated.[@property] optimizer device buffers to use if tensor is used as a parameter These are the device side optimizer (momentum and velocity) buffers which developers can querystatic booleanresolveClassMethod(org.moe.natj.objc.SEL sel)Deprecated.static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)Deprecated.voidsetLabel(@NotNull java.lang.String value)Deprecated.[@property] label A string to help identify this object.static voidsetVersion_static(long aVersion)Deprecated.static org.moe.natj.objc.Classsuperclass_static()Deprecated.booleansynchronizeData()Deprecated.Synchronize the data in host memory.booleansynchronizeOptimizerData()Deprecated.Synchronize the optimizer data in host memory.@Nullable MLCTensortensorByDequantizingToTypeScaleBias(int type, @NotNull MLCTensor scale, @NotNull MLCTensor bias)Deprecated.Converts a quantized tensor to a 32-bit floating-point tensor Returns a de-quantized tensor@Nullable MLCTensortensorByDequantizingToTypeScaleBiasAxis(int type, @NotNull MLCTensor scale, @NotNull MLCTensor bias, long axis)Deprecated.Converts a quantized tensor to a 32-bit floating-point tensor Returns a de-quantized tensor@Nullable MLCTensortensorByQuantizingToTypeScaleBias(int type, float scale, long bias)Deprecated.Converts a 32-bit floating-point tensor with given scale and a zero point Returns a quantized tensor@Nullable MLCTensortensorByQuantizingToTypeScaleBiasAxis(int type, @NotNull MLCTensor scale, @NotNull MLCTensor bias, long axis)Deprecated.Converts a 32-bit floating-point tensor with given scale and a zero point Returns a quantized tensorlongtensorID()Deprecated.[@property] tensorID The tensor ID A unique number to identify each tensor.static MLCTensortensorWithDescriptor(@NotNull MLCTensorDescriptor tensorDescriptor)Deprecated.Create a MLCTensor object Create a tensor object without any datastatic MLCTensortensorWithDescriptorData(@NotNull MLCTensorDescriptor tensorDescriptor, @NotNull MLCTensorData data)Deprecated.Create a MLCTensor object Create a tensor object with a MLCTensorData object that specifies the tensor data bufferstatic MLCTensortensorWithDescriptorFillWithData(@NotNull MLCTensorDescriptor tensorDescriptor, @NotNull NSNumber fillData)Deprecated.Create a MLCTensor object Create a tensor object with a MLCTensorData object that specifies the tensor data bufferstatic MLCTensortensorWithDescriptorRandomInitializerType(@NotNull MLCTensorDescriptor tensorDescriptor, int randomInitializerType)Deprecated.Create a MLCTensor object Create a tensor object initialized with a random initializer such as Glorot Uniform.static MLCTensortensorWithSequenceLengthFeatureChannelCountBatchSize(long sequenceLength, long featureChannelCount, long batchSize)Deprecated.Create a MLCTensor object Create a tensor typically used by a recurrent layer The tensor data type is MLCDataTypeFloat32.static MLCTensortensorWithSequenceLengthFeatureChannelCountBatchSizeData(long sequenceLength, long featureChannelCount, long batchSize, @Nullable MLCTensorData data)Deprecated.Create a MLCTensor object Create a tensor typically used by a recurrent layer The tensor data type is MLCDataTypeFloat32.static MLCTensortensorWithSequenceLengthFeatureChannelCountBatchSizeRandomInitializerType(long sequenceLength, long featureChannelCount, long batchSize, int randomInitializerType)Deprecated.Create a MLCTensor object Create a tensor typically used by a recurrent layer The tensor data type is MLCDataTypeFloat32.static MLCTensortensorWithSequenceLengthsSortedSequencesFeatureChannelCountBatchSizeData(@NotNull NSArray<? extends NSNumber> sequenceLengths, boolean sortedSequences, long featureChannelCount, long batchSize, @Nullable MLCTensorData data)Deprecated.Create a MLCTensor object Create a tensor of variable length sequences typically used by a recurrent layer The tensor data type is MLCDataTypeFloat32.static MLCTensortensorWithSequenceLengthsSortedSequencesFeatureChannelCountBatchSizeRandomInitializerType(@NotNull NSArray<? extends NSNumber> sequenceLengths, boolean sortedSequences, long featureChannelCount, long batchSize, int randomInitializerType)Deprecated.Create a MLCTensor object Create a tensor of variable length sequences typically used by a recurrent layer The tensor data type is MLCDataTypeFloat32.static MLCTensortensorWithShape(@NotNull NSArray<? extends NSNumber> shape)Deprecated.Create a MLCTensor object Create a tensor object without any data.static MLCTensortensorWithShapeDataDataType(@NotNull NSArray<? extends NSNumber> shape, @NotNull MLCTensorData data, int dataType)Deprecated.Create a MLCTensor object Create a tensor object with datastatic MLCTensortensorWithShapeDataType(@NotNull NSArray<? extends NSNumber> shape, int dataType)Deprecated.Create a MLCTensor object Create a tensor object without any datastatic MLCTensortensorWithShapeFillWithDataDataType(@NotNull NSArray<? extends NSNumber> shape, @NotNull NSNumber fillData, int dataType)Deprecated.Create a MLCTensor object Create a tensor object with datastatic MLCTensortensorWithShapeRandomInitializerType(@NotNull NSArray<? extends NSNumber> shape, int randomInitializerType)Deprecated.Create a MLCTensor object Create a tensor object initialized with a random initializer such as Glorot Uniform.static MLCTensortensorWithShapeRandomInitializerTypeDataType(@NotNull NSArray<? extends NSNumber> shape, int randomInitializerType, int dataType)Deprecated.Create a MLCTensor object Create a tensor object initialized with a random initializer such as Glorot Uniform.static MLCTensortensorWithWidthHeightFeatureChannelCountBatchSize(long width, long height, long featureChannelCount, long batchSize)Deprecated.Create a MLCTensor object Create a NCHW tensor object with tensor data type = MLCDataTypeFloat32static MLCTensortensorWithWidthHeightFeatureChannelCountBatchSizeData(long width, long height, long featureChannelCount, long batchSize, @NotNull MLCTensorData data)Deprecated.Create a MLCTensor object Create a NCHW tensor object with a tensor data object The tensor data type is MLCDataTypeFloat32.static MLCTensortensorWithWidthHeightFeatureChannelCountBatchSizeDataDataType(long width, long height, long featureChannelCount, long batchSize, @NotNull MLCTensorData data, int dataType)Deprecated.Create a MLCTensor object Create a NCHW tensor object with a tensor data object The tensor data type is MLCDataTypeFloat32.static MLCTensortensorWithWidthHeightFeatureChannelCountBatchSizeFillWithDataDataType(long width, long height, long featureChannelCount, long batchSize, float fillData, int dataType)Deprecated.Create a MLCTensor object Create a NCHW tensor object initialized with a scalar valuestatic MLCTensortensorWithWidthHeightFeatureChannelCountBatchSizeRandomInitializerType(long width, long height, long featureChannelCount, long batchSize, int randomInitializerType)Deprecated.Create a MLCTensor object Create a NCHW tensor object initialized with a random initializer type.static booleanuseStoredAccessor()Deprecated.static longversion_static()Deprecated.-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivateBlock, accessibilityActivationPoint, accessibilityActivationPointBlock, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedHintBlock, accessibilityAttributedLabel, accessibilityAttributedLabelBlock, accessibilityAttributedUserInputLabels, accessibilityAttributedUserInputLabelsBlock, accessibilityAttributedValue, accessibilityAttributedValueBlock, accessibilityContainerType, accessibilityContainerTypeBlock, accessibilityCustomActions, accessibilityCustomActionsBlock, accessibilityCustomRotors, accessibilityCustomRotorsBlock, accessibilityDecrement, accessibilityDecrementBlock, accessibilityDirectTouchOptions, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsBlock, accessibilityElementsHidden, accessibilityElementsHiddenBlock, accessibilityFrame, accessibilityFrameBlock, accessibilityHeaderElementsBlock, accessibilityHint, accessibilityHintBlock, accessibilityIdentifierBlock, accessibilityIncrement, accessibilityIncrementBlock, accessibilityLabel, accessibilityLabelBlock, accessibilityLanguage, accessibilityLanguageBlock, accessibilityMagicTapBlock, accessibilityNavigationStyle, accessibilityNavigationStyleBlock, accessibilityPath, accessibilityPathBlock, accessibilityPerformEscape, accessibilityPerformEscapeBlock, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityRespondsToUserInteractionBlock, accessibilityScroll, accessibilityShouldGroupAccessibilityChildrenBlock, accessibilityTextualContext, accessibilityTextualContextBlock, accessibilityTraits, accessibilityTraitsBlock, accessibilityUserInputLabels, accessibilityUserInputLabelsBlock, accessibilityValue, accessibilityValueBlock, accessibilityViewIsModal, accessibilityViewIsModalBlock, accessibilityZoomInAtPoint, accessibilityZoomOutAtPoint, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, automationElements, automationElementsBlock, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hash, indexOfAccessibilityElement, isAccessibilityElement, isAccessibilityElementBlock, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivateBlock, setAccessibilityActivationPoint, setAccessibilityActivationPointBlock, setAccessibilityAttributedHint, setAccessibilityAttributedHintBlock, setAccessibilityAttributedLabel, setAccessibilityAttributedLabelBlock, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedUserInputLabelsBlock, setAccessibilityAttributedValue, setAccessibilityAttributedValueBlock, setAccessibilityContainerType, setAccessibilityContainerTypeBlock, setAccessibilityCustomActions, setAccessibilityCustomActionsBlock, setAccessibilityCustomRotors, setAccessibilityCustomRotorsBlock, setAccessibilityDecrementBlock, setAccessibilityDirectTouchOptions, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsBlock, setAccessibilityElementsHidden, setAccessibilityElementsHiddenBlock, setAccessibilityFrame, setAccessibilityFrameBlock, setAccessibilityHeaderElementsBlock, setAccessibilityHint, setAccessibilityHintBlock, setAccessibilityIdentifierBlock, setAccessibilityIncrementBlock, setAccessibilityLabel, setAccessibilityLabelBlock, setAccessibilityLanguage, setAccessibilityLanguageBlock, setAccessibilityMagicTapBlock, setAccessibilityNavigationStyle, setAccessibilityNavigationStyleBlock, setAccessibilityPath, setAccessibilityPathBlock, setAccessibilityPerformEscapeBlock, setAccessibilityRespondsToUserInteraction, setAccessibilityRespondsToUserInteractionBlock, setAccessibilityShouldGroupAccessibilityChildrenBlock, setAccessibilityTextualContext, setAccessibilityTextualContextBlock, setAccessibilityTraits, setAccessibilityTraitsBlock, setAccessibilityUserInputLabels, setAccessibilityUserInputLabelsBlock, setAccessibilityValue, setAccessibilityValueBlock, setAccessibilityViewIsModal, setAccessibilityViewIsModalBlock, setAutomationElements, setAutomationElementsBlock, setIsAccessibilityElement, setIsAccessibilityElementBlock, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, storedValueForKey, superclass, takeStoredValueForKey, takeValueForKey, takeValueForKeyPath, takeValuesFromDictionary, unableToSetNilForKey, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, valuesForKeys, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
Deprecated.
-
alloc
public static MLCTensor alloc()
Deprecated.
-
allocWithZone
public static MLCTensor allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
Deprecated.
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(@NotNull @NotNull java.lang.String key)Deprecated.
-
bindAndWriteDataToDevice
public boolean bindAndWriteDataToDevice(@NotNull @NotNull MLCTensorData data, @NotNull @NotNull MLCDevice device)Deprecated.Associates the given data to the tensor. If the device is GPU, also copies the data to the device memory. Returns true if the data is successfully associated with the tensor and copied to the device. The caller must guarantee the lifetime of the underlying memory of \p data for the entirety of the tensor's lifetime. For input tensors, we recommend that the bindAndwriteData method provided by MLCTrainingGraph and MLCInferenceGraph be used. This method should only be used to allocate and copy data to device memory for tensors that are typically layer parameters such as weights, bias for convolution layers, beta, gamma for normalization layers.- Parameters:
data- The data to associated with the tensordevice- The compute device- Returns:
- A Boolean value indicating whether the data is successfully associated with the tensor and copied to the device.
-
bindOptimizerDataDeviceData
public boolean bindOptimizerDataDeviceData(@NotNull @NotNull NSArray<? extends MLCTensorData> data, @Nullable @Nullable NSArray<? extends MLCTensorOptimizerDeviceData> deviceData)Deprecated.Associates the given optimizer data and device data buffers to the tensor. Returns true if the data is successfully associated with the tensor and copied to the device. The caller must guarantee the lifetime of the underlying memory of \p data for the entirety of the tensor's lifetime. The \p deviceData buffers are allocated by MLCompute. This method must be called before executeOptimizerUpdateWithOptions or executeWithInputsData is called for the training graph.- Parameters:
data- The optimizer data to be associated with the tensordeviceData- The optimizer device data to be associated with the tensor- Returns:
- A Boolean value indicating whether the data is successfully associated with the tensor .
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(@NotNull @NotNull java.lang.Object aTarget)Deprecated.
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull @NotNull java.lang.Object aTarget, @NotNull @NotNull org.moe.natj.objc.SEL aSelector, @Nullable @Nullable java.lang.Object anArgument)Deprecated.
-
classFallbacksForKeyedArchiver
@NotNull public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
Deprecated.
-
classForKeyedUnarchiver
@NotNull public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
Deprecated.
-
copyDataFromDeviceMemoryToBytesLengthSynchronizeWithDevice
public boolean copyDataFromDeviceMemoryToBytesLengthSynchronizeWithDevice(@NotNull @NotNull org.moe.natj.general.ptr.VoidPtr bytes, long length, boolean synchronizeWithDevice)Deprecated.Copy tensor data from device memory to user specified memory Before copying tensor data from device memory, one may need to synchronize the device memory for example when device is the GPU. The synchronizeWithDevice argumet can be set appropraitely to indicate this. For CPU this is ignored. If the tensor has been specified in outputs of a graph using addOutputs, synchronizeWithDevice should be set to NO. NOTE: This method should only be called once the graph that this tensor is used with has finished execution; Otherwise the results in device memory may not be up to date. synchronizeWithDevice must be set to NO when this method is called from a completion callback for GPU.- Parameters:
bytes- The user specified data in which to copylength- The size in bytes to copysynchronizeWithDevice- Whether to synchronize device memory if device is GPU- Returns:
- Returns YES if success, NO if there is a failure to synchronize
-
copyWithZone
@NotNull public @NotNull java.lang.Object copyWithZone(@Nullable @Nullable org.moe.natj.general.ptr.VoidPtr zone)Deprecated.- Specified by:
copyWithZonein interfaceNSCopying
-
data
@Nullable public @Nullable NSData data()
Deprecated.[@property] data The tensor data
-
debugDescription_static
public static java.lang.String debugDescription_static()
Deprecated.
-
description_static
public static java.lang.String description_static()
Deprecated.
-
descriptor
@NotNull public @NotNull MLCTensorDescriptor descriptor()
Deprecated.[@property] descriptor The tensor descriptor
-
device
@Nullable public @Nullable MLCDevice device()
Deprecated.[@property] device The device associated with this tensor.
-
hasValidNumerics
public boolean hasValidNumerics()
Deprecated.Returns a Boolean value indicating whether the underlying data has valid floating-point numerics, i.e. it does not contain NaN or INF floating-point values.
-
hash_static
public static long hash_static()
Deprecated.
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
Deprecated.
-
instanceMethodSignatureForSelector
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
Deprecated.
-
instancesRespondToSelector
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
Deprecated.
-
isSubclassOfClass
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
Deprecated.
-
keyPathsForValuesAffectingValueForKey
@NotNull public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(@NotNull @NotNull java.lang.String key)
Deprecated.
-
label
@NotNull public @NotNull java.lang.String label()
Deprecated.[@property] label A string to help identify this object.
-
new_objc
public static MLCTensor new_objc()
Deprecated.
-
optimizerData
@NotNull public @NotNull NSArray<? extends MLCTensorData> optimizerData()
Deprecated.[@property] optimizer buffers to use if tensor is used as a parameter These are the host side optimizer (momentum and velocity) buffers which developers can query and initialize When customizing optimizer data, the contents of these buffers must be initialized before executing optimizer update for a graph.
-
optimizerDeviceData
@NotNull public @NotNull NSArray<? extends MLCTensorOptimizerDeviceData> optimizerDeviceData()
Deprecated.[@property] optimizer device buffers to use if tensor is used as a parameter These are the device side optimizer (momentum and velocity) buffers which developers can query
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
Deprecated.
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
Deprecated.
-
setLabel
public void setLabel(@NotNull @NotNull java.lang.String value)Deprecated.[@property] label A string to help identify this object.
-
setVersion_static
public static void setVersion_static(long aVersion)
Deprecated.
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
Deprecated.
-
synchronizeData
public boolean synchronizeData()
Deprecated.Synchronize the data in host memory. Synchronize the data in host memory i.e. tensor.data with latest contents in device memory This should only be called once the graph that this tensor is used with has finished execution; Otherwise the results in device memory may not be up to date. NOTE: This method should not be called from a completion callback when device is the GPU.- Returns:
- Returns YES if success, NO if there is a failure to synchronize
-
synchronizeOptimizerData
public boolean synchronizeOptimizerData()
Deprecated.Synchronize the optimizer data in host memory. Synchronize the optimizer data in host memory with latest contents in device memory This should only be called once the graph that this tensor is used with has finished execution; Otherwise the results in device memory may not be up to date. NOTE: This method should not be called from a completion callback when device is the GPU.- Returns:
- Returns YES if success, NO if there is a failure to synchronize
-
tensorByDequantizingToTypeScaleBias
@Nullable public @Nullable MLCTensor tensorByDequantizingToTypeScaleBias(int type, @NotNull @NotNull MLCTensor scale, @NotNull @NotNull MLCTensor bias)
Deprecated.Converts a quantized tensor to a 32-bit floating-point tensor Returns a de-quantized tensor- Parameters:
type- The de-quantized data type. Must be MLCFloat32scale- The scale thst was used for the quantized databias- The offset value that maps to float zero used for the quantized data- Returns:
- A quantized tensor API-Since: 15.0
-
tensorByDequantizingToTypeScaleBiasAxis
@Nullable public @Nullable MLCTensor tensorByDequantizingToTypeScaleBiasAxis(int type, @NotNull @NotNull MLCTensor scale, @NotNull @NotNull MLCTensor bias, long axis)
Deprecated.Converts a quantized tensor to a 32-bit floating-point tensor Returns a de-quantized tensor- Parameters:
type- The de-quantized data type. Must be MLCFloat32scale- The scale thst was used for the quantized databias- The offset value that maps to float zero used for the quantized dataaxis- The dimension on which to apply per-channel quantization- Returns:
- A quantized tensor API-Since: 15.0
-
tensorByQuantizingToTypeScaleBias
@Nullable public @Nullable MLCTensor tensorByQuantizingToTypeScaleBias(int type, float scale, long bias)
Deprecated.Converts a 32-bit floating-point tensor with given scale and a zero point Returns a quantized tensor- Parameters:
type- The quantized data type. Must be MLCDataTypeInt8, MLCDataTypeUInt8 or MLCDataTypeInt32scale- The scale to apply in quantizationbias- The offset value that maps to float zero- Returns:
- A quantized tensor API-Since: 15.0
-
tensorByQuantizingToTypeScaleBiasAxis
@Nullable public @Nullable MLCTensor tensorByQuantizingToTypeScaleBiasAxis(int type, @NotNull @NotNull MLCTensor scale, @NotNull @NotNull MLCTensor bias, long axis)
Deprecated.Converts a 32-bit floating-point tensor with given scale and a zero point Returns a quantized tensor- Parameters:
type- The quantized data type. Must be MLCDataTypeInt8, MLCDataTypeUInt8 or MLCDataTypeInt32scale- The scale to apply in quantizationbias- The offset value that maps to float zeroaxis- The dimension on which to apply per-channel quantization- Returns:
- A quantized tensor API-Since: 15.0
-
tensorID
public long tensorID()
Deprecated.[@property] tensorID The tensor ID A unique number to identify each tensor. Assigned when the tensor is created.
-
tensorWithDescriptor
public static MLCTensor tensorWithDescriptor(@NotNull @NotNull MLCTensorDescriptor tensorDescriptor)
Deprecated.Create a MLCTensor object Create a tensor object without any data- Returns:
- A new MLCTensor object
-
tensorWithDescriptorData
public static MLCTensor tensorWithDescriptorData(@NotNull @NotNull MLCTensorDescriptor tensorDescriptor, @NotNull @NotNull MLCTensorData data)
Deprecated.Create a MLCTensor object Create a tensor object with a MLCTensorData object that specifies the tensor data buffer- Parameters:
tensorDescriptor- The tensor descriptordata- The random initializer type- Returns:
- A new MLCTensor object
-
tensorWithDescriptorFillWithData
public static MLCTensor tensorWithDescriptorFillWithData(@NotNull @NotNull MLCTensorDescriptor tensorDescriptor, @NotNull @NotNull NSNumber fillData)
Deprecated.Create a MLCTensor object Create a tensor object with a MLCTensorData object that specifies the tensor data buffer- Parameters:
tensorDescriptor- The tensor descriptorfillData- The scalar data to fill to tensor with- Returns:
- A new MLCTensor object
-
tensorWithDescriptorRandomInitializerType
public static MLCTensor tensorWithDescriptorRandomInitializerType(@NotNull @NotNull MLCTensorDescriptor tensorDescriptor, int randomInitializerType)
Deprecated.Create a MLCTensor object Create a tensor object initialized with a random initializer such as Glorot Uniform.- Parameters:
tensorDescriptor- The tensor descriptorrandomInitializerType- The random initializer type- Returns:
- A new MLCTensor object
-
tensorWithSequenceLengthFeatureChannelCountBatchSize
public static MLCTensor tensorWithSequenceLengthFeatureChannelCountBatchSize(long sequenceLength, long featureChannelCount, long batchSize)
Deprecated.Create a MLCTensor object Create a tensor typically used by a recurrent layer The tensor data type is MLCDataTypeFloat32.- Parameters:
sequenceLength- The length of sequences stored in the tensorfeatureChannelCount- Number of feature channelsbatchSize- The tensor batch size- Returns:
- A new MLCTensor object
-
tensorWithSequenceLengthFeatureChannelCountBatchSizeData
public static MLCTensor tensorWithSequenceLengthFeatureChannelCountBatchSizeData(long sequenceLength, long featureChannelCount, long batchSize, @Nullable @Nullable MLCTensorData data)
Deprecated.Create a MLCTensor object Create a tensor typically used by a recurrent layer The tensor data type is MLCDataTypeFloat32.- Parameters:
sequenceLength- The length of sequences stored in the tensorfeatureChannelCount- Number of feature channelsbatchSize- The tensor batch sizedata- The tensor data- Returns:
- A new MLCTensor object
-
tensorWithSequenceLengthFeatureChannelCountBatchSizeRandomInitializerType
public static MLCTensor tensorWithSequenceLengthFeatureChannelCountBatchSizeRandomInitializerType(long sequenceLength, long featureChannelCount, long batchSize, int randomInitializerType)
Deprecated.Create a MLCTensor object Create a tensor typically used by a recurrent layer The tensor data type is MLCDataTypeFloat32.- Parameters:
sequenceLength- The length of sequences stored in the tensorfeatureChannelCount- Number of feature channelsbatchSize- The tensor batch sizerandomInitializerType- The random initializer type- Returns:
- A new MLCTensor object
-
tensorWithSequenceLengthsSortedSequencesFeatureChannelCountBatchSizeData
public static MLCTensor tensorWithSequenceLengthsSortedSequencesFeatureChannelCountBatchSizeData(@NotNull @NotNull NSArray<? extends NSNumber> sequenceLengths, boolean sortedSequences, long featureChannelCount, long batchSize, @Nullable @Nullable MLCTensorData data)
Deprecated.Create a MLCTensor object Create a tensor of variable length sequences typically used by a recurrent layer The tensor data type is MLCDataTypeFloat32.- Parameters:
sequenceLengths- An array of sequence lengthssortedSequences- A flag to indicate if the sequence lengths are sorted. If yes, they must be sorted in descending orderfeatureChannelCount- Number of feature channelsbatchSize- The tensor batch sizedata- The tensor data- Returns:
- A new MLCTensor object
-
tensorWithSequenceLengthsSortedSequencesFeatureChannelCountBatchSizeRandomInitializerType
public static MLCTensor tensorWithSequenceLengthsSortedSequencesFeatureChannelCountBatchSizeRandomInitializerType(@NotNull @NotNull NSArray<? extends NSNumber> sequenceLengths, boolean sortedSequences, long featureChannelCount, long batchSize, int randomInitializerType)
Deprecated.Create a MLCTensor object Create a tensor of variable length sequences typically used by a recurrent layer The tensor data type is MLCDataTypeFloat32.- Parameters:
sequenceLengths- An array of sequence lengthssortedSequences- A flag to indicate if the sequence lengths are sorted. If yes, they must be sorted in descending orderfeatureChannelCount- Number of feature channelsbatchSize- The tensor batch sizerandomInitializerType- The random initializer type- Returns:
- A new MLCTensor object
-
tensorWithShape
public static MLCTensor tensorWithShape(@NotNull @NotNull NSArray<? extends NSNumber> shape)
Deprecated.Create a MLCTensor object Create a tensor object without any data. The tensor data type is MLCDataTypeFloat32.- Parameters:
shape- The tensor shape- Returns:
- A new MLCTensor object
-
tensorWithShapeDataDataType
public static MLCTensor tensorWithShapeDataDataType(@NotNull @NotNull NSArray<? extends NSNumber> shape, @NotNull @NotNull MLCTensorData data, int dataType)
Deprecated.Create a MLCTensor object Create a tensor object with data- Parameters:
shape- The tensor shapedata- The tensor datadataType- The tensor data type- Returns:
- A new MLCTensor object
-
tensorWithShapeDataType
public static MLCTensor tensorWithShapeDataType(@NotNull @NotNull NSArray<? extends NSNumber> shape, int dataType)
Deprecated.Create a MLCTensor object Create a tensor object without any data- Parameters:
shape- The tensor shapedataType- The tensor data type- Returns:
- A new MLCTensor object
-
tensorWithShapeFillWithDataDataType
public static MLCTensor tensorWithShapeFillWithDataDataType(@NotNull @NotNull NSArray<? extends NSNumber> shape, @NotNull @NotNull NSNumber fillData, int dataType)
Deprecated.Create a MLCTensor object Create a tensor object with data- Parameters:
shape- The tensor shapefillData- The scalar value to initialize the tensor data withdataType- The tensor data type- Returns:
- A new MLCTensor object
-
tensorWithShapeRandomInitializerType
public static MLCTensor tensorWithShapeRandomInitializerType(@NotNull @NotNull NSArray<? extends NSNumber> shape, int randomInitializerType)
Deprecated.Create a MLCTensor object Create a tensor object initialized with a random initializer such as Glorot Uniform. The tensor data type is MLCDataTypeFloat32- Parameters:
shape- The tensor shaperandomInitializerType- The random initializer type- Returns:
- A new MLCTensor object
-
tensorWithShapeRandomInitializerTypeDataType
public static MLCTensor tensorWithShapeRandomInitializerTypeDataType(@NotNull @NotNull NSArray<? extends NSNumber> shape, int randomInitializerType, int dataType)
Deprecated.Create a MLCTensor object Create a tensor object initialized with a random initializer such as Glorot Uniform. The tensor data type is MLCDataTypeFloat32- Parameters:
shape- The tensor shaperandomInitializerType- The random initializer typedataType- The tensor data type- Returns:
- A new MLCTensor object
-
tensorWithWidthHeightFeatureChannelCountBatchSize
public static MLCTensor tensorWithWidthHeightFeatureChannelCountBatchSize(long width, long height, long featureChannelCount, long batchSize)
Deprecated.Create a MLCTensor object Create a NCHW tensor object with tensor data type = MLCDataTypeFloat32- Parameters:
width- The tensor widthheight- The tensor heightfeatureChannelCount- Number of feature channelsbatchSize- The tensor batch size- Returns:
- A new MLCTensor object
-
tensorWithWidthHeightFeatureChannelCountBatchSizeData
public static MLCTensor tensorWithWidthHeightFeatureChannelCountBatchSizeData(long width, long height, long featureChannelCount, long batchSize, @NotNull @NotNull MLCTensorData data)
Deprecated.Create a MLCTensor object Create a NCHW tensor object with a tensor data object The tensor data type is MLCDataTypeFloat32.- Parameters:
width- The tensor widthheight- The tensor heightfeatureChannelCount- Number of feature channelsbatchSize- The tensor batch sizedata- The tensor data- Returns:
- A new MLCTensor object
-
tensorWithWidthHeightFeatureChannelCountBatchSizeDataDataType
public static MLCTensor tensorWithWidthHeightFeatureChannelCountBatchSizeDataDataType(long width, long height, long featureChannelCount, long batchSize, @NotNull @NotNull MLCTensorData data, int dataType)
Deprecated.Create a MLCTensor object Create a NCHW tensor object with a tensor data object The tensor data type is MLCDataTypeFloat32.- Parameters:
width- The tensor widthheight- The tensor heightfeatureChannelCount- Number of feature channelsbatchSize- The tensor batch sizedata- The tensor datadataType- The tensor data type- Returns:
- A new MLCTensor object
-
tensorWithWidthHeightFeatureChannelCountBatchSizeFillWithDataDataType
public static MLCTensor tensorWithWidthHeightFeatureChannelCountBatchSizeFillWithDataDataType(long width, long height, long featureChannelCount, long batchSize, float fillData, int dataType)
Deprecated.Create a MLCTensor object Create a NCHW tensor object initialized with a scalar value- Parameters:
width- The tensor widthheight- The tensor heightfeatureChannelCount- Number of feature channelsbatchSize- The tensor batch sizefillData- The scalar value to initialize the tensor data withdataType- The tensor data type- Returns:
- A new MLCTensorData object
-
tensorWithWidthHeightFeatureChannelCountBatchSizeRandomInitializerType
public static MLCTensor tensorWithWidthHeightFeatureChannelCountBatchSizeRandomInitializerType(long width, long height, long featureChannelCount, long batchSize, int randomInitializerType)
Deprecated.Create a MLCTensor object Create a NCHW tensor object initialized with a random initializer type. The tensor data type is MLCDataTypeFloat32- Parameters:
width- The tensor widthheight- The tensor heightfeatureChannelCount- Number of feature channelsbatchSize- The tensor batch sizerandomInitializerType- The random initializer type- Returns:
- A new MLCTensor object
-
version_static
public static long version_static()
Deprecated.
-
useStoredAccessor
@Deprecated public static boolean useStoredAccessor()
Deprecated.
-
-