Package apple.mlcompute
Class MLCTrainingGraph
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.mlcompute.MLCGraph
-
- apple.mlcompute.MLCTrainingGraph
-
- All Implemented Interfaces:
NSObject
@Deprecated public class MLCTrainingGraph extends MLCGraph
Deprecated.MLCTrainingGraph A training graph created from one or more MLCGraph objects plus additional layers added directly to the training graph. API-Since: 14.0 Deprecated-Since: 100000.0 Deprecated-Message: Use Metal Performance Shaders Graph or BNNS instead.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceMLCTrainingGraph.Block_executeForwardWithBatchSizeOptionsCompletionHandlerDeprecated.static interfaceMLCTrainingGraph.Block_executeForwardWithBatchSizeOptionsOutputsDataCompletionHandlerDeprecated.static interfaceMLCTrainingGraph.Block_executeGradientWithBatchSizeOptionsCompletionHandlerDeprecated.static interfaceMLCTrainingGraph.Block_executeGradientWithBatchSizeOptionsOutputsDataCompletionHandlerDeprecated.static interfaceMLCTrainingGraph.Block_executeOptimizerUpdateWithOptionsCompletionHandlerDeprecated.static interfaceMLCTrainingGraph.Block_executeWithInputsDataLossLabelsDataLossLabelWeightsDataBatchSizeOptionsCompletionHandlerDeprecated.static interfaceMLCTrainingGraph.Block_executeWithInputsDataLossLabelsDataLossLabelWeightsDataOutputsDataBatchSizeOptionsCompletionHandlerDeprecated.-
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 protectedMLCTrainingGraph(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.booleanaddInputsLossLabels(@NotNull NSDictionary<java.lang.String,? extends MLCTensor> inputs, @Nullable NSDictionary<java.lang.String,? extends MLCTensor> lossLabels)Deprecated.Add the list of inputs to the training graphbooleanaddInputsLossLabelsLossLabelWeights(@NotNull NSDictionary<java.lang.String,? extends MLCTensor> inputs, @Nullable NSDictionary<java.lang.String,? extends MLCTensor> lossLabels, @Nullable NSDictionary<java.lang.String,? extends MLCTensor> lossLabelWeights)Deprecated.Add the list of inputs to the training graph Each input, loss label or label weights tensor is identified by a NSString.booleanaddOutputs(@NotNull NSDictionary<java.lang.String,? extends MLCTensor> outputs)Deprecated.Add the list of outputs to the training graphstatic MLCTrainingGraphalloc()Deprecated.@Nullable MLCTensorallocateUserGradientForTensor(@NotNull MLCTensor tensor)Deprecated.Allocate an entry for a user specified gradient for a tensorstatic MLCTrainingGraphallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)Deprecated.static booleanautomaticallyNotifiesObserversForKey(@NotNull java.lang.String key)Deprecated.booleanbindOptimizerDataDeviceDataWithTensor(@NotNull NSArray<? extends MLCTensorData> data, @Nullable NSArray<? extends MLCTensorOptimizerDeviceData> deviceData, @NotNull MLCTensor tensor)Deprecated.Associates the given optimizer data and device data buffers with 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.booleancompileOptimizer(@NotNull MLCOptimizer optimizer)Deprecated.Compile the optimizer to be used with a training graph.booleancompileWithOptionsDevice(long options, @NotNull MLCDevice device)Deprecated.Compile the training graph for a device.booleancompileWithOptionsDeviceInputTensorsInputTensorsData(long options, @NotNull MLCDevice device, @Nullable NSDictionary<java.lang.String,? extends MLCTensor> inputTensors, @Nullable NSDictionary<java.lang.String,? extends MLCTensorData> inputTensorsData)Deprecated.Compile the training graph for a device.static java.lang.StringdebugDescription_static()Deprecated.static java.lang.Stringdescription_static()Deprecated.longdeviceMemorySize()Deprecated.[@property] The device memory size used by the training graph Returns the total size in bytes of device memory used for all intermediate tensors for forward, gradient passes and optimizer update for all layers in the training graph.booleanexecuteForwardWithBatchSizeOptionsCompletionHandler(long batchSize, long options, @Nullable MLCTrainingGraph.Block_executeForwardWithBatchSizeOptionsCompletionHandler completionHandler)Deprecated.Execute the forward pass of the training graphbooleanexecuteForwardWithBatchSizeOptionsOutputsDataCompletionHandler(long batchSize, long options, @Nullable NSDictionary<java.lang.String,? extends MLCTensorData> outputsData, @Nullable MLCTrainingGraph.Block_executeForwardWithBatchSizeOptionsOutputsDataCompletionHandler completionHandler)Deprecated.Execute the forward pass for the training graphbooleanexecuteGradientWithBatchSizeOptionsCompletionHandler(long batchSize, long options, @Nullable MLCTrainingGraph.Block_executeGradientWithBatchSizeOptionsCompletionHandler completionHandler)Deprecated.Execute the gradient pass of the training graphbooleanexecuteGradientWithBatchSizeOptionsOutputsDataCompletionHandler(long batchSize, long options, @Nullable NSDictionary<java.lang.String,? extends MLCTensorData> outputsData, @Nullable MLCTrainingGraph.Block_executeGradientWithBatchSizeOptionsOutputsDataCompletionHandler completionHandler)Deprecated.Execute the gradient pass of the training graphbooleanexecuteOptimizerUpdateWithOptionsCompletionHandler(long options, @Nullable MLCTrainingGraph.Block_executeOptimizerUpdateWithOptionsCompletionHandler completionHandler)Deprecated.Execute the optimizer update pass of the training graphbooleanexecuteWithInputsDataLossLabelsDataLossLabelWeightsDataBatchSizeOptionsCompletionHandler(@NotNull NSDictionary<java.lang.String,? extends MLCTensorData> inputsData, @Nullable NSDictionary<java.lang.String,? extends MLCTensorData> lossLabelsData, @Nullable NSDictionary<java.lang.String,? extends MLCTensorData> lossLabelWeightsData, long batchSize, long options, @Nullable MLCTrainingGraph.Block_executeWithInputsDataLossLabelsDataLossLabelWeightsDataBatchSizeOptionsCompletionHandler completionHandler)Deprecated.Execute the training graph (forward, gradient and optimizer update) with given source and label data Execute the training graph with given source and label data.booleanexecuteWithInputsDataLossLabelsDataLossLabelWeightsDataOutputsDataBatchSizeOptionsCompletionHandler(@NotNull NSDictionary<java.lang.String,? extends MLCTensorData> inputsData, @Nullable NSDictionary<java.lang.String,? extends MLCTensorData> lossLabelsData, @Nullable NSDictionary<java.lang.String,? extends MLCTensorData> lossLabelWeightsData, @Nullable NSDictionary<java.lang.String,? extends MLCTensorData> outputsData, long batchSize, long options, @Nullable MLCTrainingGraph.Block_executeWithInputsDataLossLabelsDataLossLabelWeightsDataOutputsDataBatchSizeOptionsCompletionHandler completionHandler)Deprecated.Execute the training graph (forward, gradient and optimizer update) with given source and label data@Nullable NSDatagradientDataForParameterLayer(@NotNull MLCTensor parameter, @NotNull MLCLayer layer)Deprecated.Get the gradient data for a trainable parameter associated with a layer This can be used to get the gradient data for weights or biases parameters associated with a convolution, fully connected or convolution transpose layer@Nullable MLCTensorgradientTensorForInput(@NotNull MLCTensor input)Deprecated.Get the gradient tensor for an input tensorstatic MLCTrainingGraphgraph()Deprecated.static MLCTrainingGraphgraphWithGraphObjectsLossLayerOptimizer(@NotNull NSArray<? extends MLCGraph> graphObjects, @Nullable MLCLayer lossLayer, @Nullable MLCOptimizer optimizer)Deprecated.Create a training graphstatic longhash_static()Deprecated.MLCTrainingGraphinit()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.booleanlinkWithGraphs(@NotNull NSArray<? extends MLCTrainingGraph> graphs)Deprecated.Link mutiple training graphs This is used to link subsequent training graphs with first training sub-graph.static MLCTrainingGraphnew_objc()Deprecated.@Nullable MLCOptimizeroptimizer()Deprecated.[@property] optimizer The optimizer to be used with the training graphstatic booleanresolveClassMethod(org.moe.natj.objc.SEL sel)Deprecated.static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)Deprecated.@NotNull NSArray<? extends MLCTensor>resultGradientTensorsForLayer(@NotNull MLCLayer layer)Deprecated.Get the result gradient tensors for a layer in the training graphbooleansetTrainingTensorParameters(@NotNull NSArray<? extends MLCTensorParameter> parameters)Deprecated.Set the input tensor parameters that also will be updated by the optimizer These represent the list of input tensors to be updated when we execute the optimizer update Weights, bias or beta, gamma tensors are not included in this list.static voidsetVersion_static(long aVersion)Deprecated.@NotNull NSArray<? extends MLCTensor>sourceGradientTensorsForLayer(@NotNull MLCLayer layer)Deprecated.Get the source gradient tensors for a layer in the training graphbooleanstopGradientForTensors(@NotNull NSArray<? extends MLCTensor> tensors)Deprecated.Add the list of tensors whose contributions are not to be taken when computing gradients during gradient passstatic org.moe.natj.objc.Classsuperclass_static()Deprecated.voidsynchronizeUpdates()Deprecated.Synchronize updates (weights/biases from convolution, fully connected and LSTM layers, tensor parameters) from device memory to host memory.static booleanuseStoredAccessor()Deprecated.static longversion_static()Deprecated.-
Methods inherited from class apple.mlcompute.MLCGraph
bindAndWriteDataForInputsToDeviceBatchSizeSynchronous, bindAndWriteDataForInputsToDeviceSynchronous, concatenateWithSourcesDimension, device, gatherWithDimensionSourceIndices, layers, nodeWithLayerSource, nodeWithLayerSources, nodeWithLayerSourcesDisableUpdate, nodeWithLayerSourcesLossLabels, reshapeWithShapeSource, resultTensorsForLayer, scatterWithDimensionSourceIndicesCopyFromReductionType, selectWithSourcesCondition, sourceTensorsForLayer, splitWithSourceSplitCountDimension, splitWithSourceSplitSectionLengthsDimension, summarizedDOTDescription, transposeWithDimensionsSource
-
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.
-
addInputsLossLabels
public boolean addInputsLossLabels(@NotNull @NotNull NSDictionary<java.lang.String,? extends MLCTensor> inputs, @Nullable @Nullable NSDictionary<java.lang.String,? extends MLCTensor> lossLabels)Deprecated.Add the list of inputs to the training graph- Parameters:
inputs- The inputslossLabels- The loss label inputs- Returns:
- A boolean indicating success or failure
-
addInputsLossLabelsLossLabelWeights
public boolean addInputsLossLabelsLossLabelWeights(@NotNull @NotNull NSDictionary<java.lang.String,? extends MLCTensor> inputs, @Nullable @Nullable NSDictionary<java.lang.String,? extends MLCTensor> lossLabels, @Nullable @Nullable NSDictionary<java.lang.String,? extends MLCTensor> lossLabelWeights)Deprecated.Add the list of inputs to the training graph Each input, loss label or label weights tensor is identified by a NSString. When the training graph is executed, this NSString is used to identify which data object should be as input data for each tensor whose device memory needs to be updated before the graph is executed.- Parameters:
inputs- The inputslossLabels- The loss label inputslossLabelWeights- The loss label weights- Returns:
- A boolean indicating success or failure
-
addOutputs
public boolean addOutputs(@NotNull @NotNull NSDictionary<java.lang.String,? extends MLCTensor> outputs)Deprecated.Add the list of outputs to the training graph- Parameters:
outputs- The outputs- Returns:
- A boolean indicating success or failure
-
alloc
public static MLCTrainingGraph alloc()
Deprecated.
-
allocWithZone
public static MLCTrainingGraph allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
Deprecated.
-
allocateUserGradientForTensor
@Nullable public @Nullable MLCTensor allocateUserGradientForTensor(@NotNull @NotNull MLCTensor tensor)
Deprecated.Allocate an entry for a user specified gradient for a tensor- Parameters:
tensor- A result tensor produced by a layer in the training graph that is input to some user specified code and will need to provide a user gradient during the gradient pass.- Returns:
- A gradient tensor
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(@NotNull @NotNull java.lang.String key)Deprecated.
-
bindOptimizerDataDeviceDataWithTensor
public boolean bindOptimizerDataDeviceDataWithTensor(@NotNull @NotNull NSArray<? extends MLCTensorData> data, @Nullable @Nullable NSArray<? extends MLCTensorOptimizerDeviceData> deviceData, @NotNull @NotNull MLCTensor tensor)Deprecated.Associates the given optimizer data and device data buffers with 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. We recommend using this method instead of using [MLCTensor bindOptimizerData] especially if the optimizer update is being called multiple times for each batch.- Parameters:
data- The optimizer data to be associated with the tensordeviceData- The optimizer device data to be associated with the tensortensor- 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.
-
compileOptimizer
public boolean compileOptimizer(@NotNull @NotNull MLCOptimizer optimizer)Deprecated.Compile the optimizer to be used with a training graph. Typically the optimizer to be used with a training graph is specifed when the training graph is created using graphWithGraphObjects:lossLayer:optimizer. The optimizer will be compiled in when compileWithOptions:device is called if an optimizer is specified with the training graph. In the case where the optimizer to be used is not known when the graph is created or compiled, this method can be used to associate and compile a training graph with an optimizer.- Parameters:
optimizer- The MLCOptimizer object- Returns:
- A boolean indicating success or failure
-
compileWithOptionsDevice
public boolean compileWithOptionsDevice(long options, @NotNull @NotNull MLCDevice device)Deprecated.Compile the training graph for a device.- Parameters:
options- The compiler options to use when compiling the training graphdevice- The MLCDevice object- Returns:
- A boolean indicating success or failure
-
compileWithOptionsDeviceInputTensorsInputTensorsData
public boolean compileWithOptionsDeviceInputTensorsInputTensorsData(long options, @NotNull @NotNull MLCDevice device, @Nullable @Nullable NSDictionary<java.lang.String,? extends MLCTensor> inputTensors, @Nullable @Nullable NSDictionary<java.lang.String,? extends MLCTensorData> inputTensorsData)Deprecated.Compile the training graph for a device. Specifying the list of constant tensors when we compile the graph allows MLCompute to perform additional optimizations at compile time.- Parameters:
options- The compiler options to use when compiling the training graphdevice- The MLCDevice objectinputTensors- The list of input tensors that are constantsinputTensorsData- The tensor data to be used with these constant input tensors- Returns:
- A boolean indicating success or failure API-Since: 14.5
-
debugDescription_static
public static java.lang.String debugDescription_static()
Deprecated.
-
description_static
public static java.lang.String description_static()
Deprecated.
-
deviceMemorySize
public long deviceMemorySize()
Deprecated.[@property] The device memory size used by the training graph Returns the total size in bytes of device memory used for all intermediate tensors for forward, gradient passes and optimizer update for all layers in the training graph. We recommend executing an iteration before checking the device memory size as the buffers needed get allocated when the corresponding pass such as gradient, optimizer update is executed.- Returns:
- A NSUInteger value
-
executeForwardWithBatchSizeOptionsCompletionHandler
public boolean executeForwardWithBatchSizeOptionsCompletionHandler(long batchSize, long options, @Nullable @Nullable MLCTrainingGraph.Block_executeForwardWithBatchSizeOptionsCompletionHandler completionHandler)Deprecated.Execute the forward pass of the training graph- Parameters:
batchSize- The batch size to use. For a graph where batch size changes between layers this value must be 0.options- The execution optionscompletionHandler- The completion handler- Returns:
- A boolean indicating success or failure
-
executeForwardWithBatchSizeOptionsOutputsDataCompletionHandler
public boolean executeForwardWithBatchSizeOptionsOutputsDataCompletionHandler(long batchSize, long options, @Nullable @Nullable NSDictionary<java.lang.String,? extends MLCTensorData> outputsData, @Nullable @Nullable MLCTrainingGraph.Block_executeForwardWithBatchSizeOptionsOutputsDataCompletionHandler completionHandler)Deprecated.Execute the forward pass for the training graph- Parameters:
batchSize- The batch size to use. For a graph where batch size changes between layers this value must be 0.options- The execution optionsoutputsData- The data objects to use for outputscompletionHandler- The completion handler- Returns:
- A boolean indicating success or failure
-
executeGradientWithBatchSizeOptionsCompletionHandler
public boolean executeGradientWithBatchSizeOptionsCompletionHandler(long batchSize, long options, @Nullable @Nullable MLCTrainingGraph.Block_executeGradientWithBatchSizeOptionsCompletionHandler completionHandler)Deprecated.Execute the gradient pass of the training graph- Parameters:
batchSize- The batch size to use. For a graph where batch size changes between layers this value must be 0.options- The execution optionscompletionHandler- The completion handler- Returns:
- A boolean indicating success or failure
-
executeGradientWithBatchSizeOptionsOutputsDataCompletionHandler
public boolean executeGradientWithBatchSizeOptionsOutputsDataCompletionHandler(long batchSize, long options, @Nullable @Nullable NSDictionary<java.lang.String,? extends MLCTensorData> outputsData, @Nullable @Nullable MLCTrainingGraph.Block_executeGradientWithBatchSizeOptionsOutputsDataCompletionHandler completionHandler)Deprecated.Execute the gradient pass of the training graph- Parameters:
batchSize- The batch size to use. For a graph where batch size changes between layers this value must be 0.options- The execution optionsoutputsData- The data objects to use for outputscompletionHandler- The completion handler- Returns:
- A boolean indicating success or failure
-
executeOptimizerUpdateWithOptionsCompletionHandler
public boolean executeOptimizerUpdateWithOptionsCompletionHandler(long options, @Nullable @Nullable MLCTrainingGraph.Block_executeOptimizerUpdateWithOptionsCompletionHandler completionHandler)Deprecated.Execute the optimizer update pass of the training graph- Parameters:
options- The execution optionscompletionHandler- The completion handler- Returns:
- A boolean indicating success or failure
-
executeWithInputsDataLossLabelsDataLossLabelWeightsDataBatchSizeOptionsCompletionHandler
public boolean executeWithInputsDataLossLabelsDataLossLabelWeightsDataBatchSizeOptionsCompletionHandler(@NotNull @NotNull NSDictionary<java.lang.String,? extends MLCTensorData> inputsData, @Nullable @Nullable NSDictionary<java.lang.String,? extends MLCTensorData> lossLabelsData, @Nullable @Nullable NSDictionary<java.lang.String,? extends MLCTensorData> lossLabelWeightsData, long batchSize, long options, @Nullable @Nullable MLCTrainingGraph.Block_executeWithInputsDataLossLabelsDataLossLabelWeightsDataBatchSizeOptionsCompletionHandler completionHandler)Deprecated.Execute the training graph (forward, gradient and optimizer update) with given source and label data Execute the training graph with given source and label data. If an optimizer is specified, the optimizer update is applied. If MLCExecutionOptionsSynchronous is specified in 'options', this method returns after the graph has been executed. Otherwise, this method returns after the graph has been queued for execution. The completion handler is called after the graph has finished execution.- Parameters:
inputsData- The data objects to use for inputslossLabelsData- The data objects to use for loss labelslossLabelWeightsData- The data objects to use for loss label weightsbatchSize- The batch size to use. For a graph where batch size changes between layers this value must be 0.options- The execution optionscompletionHandler- The completion handler- Returns:
- A boolean indicating success or failure
-
executeWithInputsDataLossLabelsDataLossLabelWeightsDataOutputsDataBatchSizeOptionsCompletionHandler
public boolean executeWithInputsDataLossLabelsDataLossLabelWeightsDataOutputsDataBatchSizeOptionsCompletionHandler(@NotNull @NotNull NSDictionary<java.lang.String,? extends MLCTensorData> inputsData, @Nullable @Nullable NSDictionary<java.lang.String,? extends MLCTensorData> lossLabelsData, @Nullable @Nullable NSDictionary<java.lang.String,? extends MLCTensorData> lossLabelWeightsData, @Nullable @Nullable NSDictionary<java.lang.String,? extends MLCTensorData> outputsData, long batchSize, long options, @Nullable @Nullable MLCTrainingGraph.Block_executeWithInputsDataLossLabelsDataLossLabelWeightsDataOutputsDataBatchSizeOptionsCompletionHandler completionHandler)Deprecated.Execute the training graph (forward, gradient and optimizer update) with given source and label data- Parameters:
inputsData- The data objects to use for inputslossLabelsData- The data objects to use for loss labelslossLabelWeightsData- The data objects to use for loss label weightsoutputsData- The data objects to use for outputsbatchSize- The batch size to use. For a graph where batch size changes between layers this value must be 0.options- The execution optionscompletionHandler- The completion handler- Returns:
- A boolean indicating success or failure
-
gradientDataForParameterLayer
@Nullable public @Nullable NSData gradientDataForParameterLayer(@NotNull @NotNull MLCTensor parameter, @NotNull @NotNull MLCLayer layer)
Deprecated.Get the gradient data for a trainable parameter associated with a layer This can be used to get the gradient data for weights or biases parameters associated with a convolution, fully connected or convolution transpose layer- Parameters:
parameter- The updatable parameter associated with the layerlayer- A layer in the training graph. Must be one of the following: - MLCConvolutionLayer - MLCFullyConnectedLayer - MLCBatchNormalizationLayer - MLCInstanceNormalizationLayer - MLCGroupNormalizationLayer - MLCLayerNormalizationLayer - MLCEmbeddingLayer - MLCMultiheadAttentionLayer- Returns:
- The gradient data. Will return nil if the layer is marked as not trainable or if training graph is not executed with separate calls to forward and gradient passes.
-
gradientTensorForInput
@Nullable public @Nullable MLCTensor gradientTensorForInput(@NotNull @NotNull MLCTensor input)
Deprecated.Get the gradient tensor for an input tensor- Parameters:
input- The input tensor- Returns:
- The gradient tensor
-
graph
public static MLCTrainingGraph graph()
Deprecated.
-
graphWithGraphObjectsLossLayerOptimizer
public static MLCTrainingGraph graphWithGraphObjectsLossLayerOptimizer(@NotNull @NotNull NSArray<? extends MLCGraph> graphObjects, @Nullable @Nullable MLCLayer lossLayer, @Nullable @Nullable MLCOptimizer optimizer)
Deprecated.Create a training graph- Parameters:
graphObjects- The layers from these graph objects will be added to the training graphlossLayer- The loss layer to use. The loss layer can also be added to the training graph using nodeWithLayer:sources:lossLabelsoptimizer- The optimizer to use- Returns:
- A new training graph object
-
hash_static
public static long hash_static()
Deprecated.
-
init
public MLCTrainingGraph init()
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.
-
linkWithGraphs
public boolean linkWithGraphs(@NotNull @NotNull NSArray<? extends MLCTrainingGraph> graphs)Deprecated.Link mutiple training graphs This is used to link subsequent training graphs with first training sub-graph. This method should be used when we have tensors shared by one or more layers in multiple sub-graphs- Parameters:
graphs- The list of training graphs to link- Returns:
- A boolean indicating success or failure
-
new_objc
public static MLCTrainingGraph new_objc()
Deprecated.
-
optimizer
@Nullable public @Nullable MLCOptimizer optimizer()
Deprecated.[@property] optimizer The optimizer to be used with the training graph
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
Deprecated.
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
Deprecated.
-
resultGradientTensorsForLayer
@NotNull public @NotNull NSArray<? extends MLCTensor> resultGradientTensorsForLayer(@NotNull @NotNull MLCLayer layer)
Deprecated.Get the result gradient tensors for a layer in the training graph- Parameters:
layer- A layer in the training graph- Returns:
- A list of tensors
-
setTrainingTensorParameters
public boolean setTrainingTensorParameters(@NotNull @NotNull NSArray<? extends MLCTensorParameter> parameters)Deprecated.Set the input tensor parameters that also will be updated by the optimizer These represent the list of input tensors to be updated when we execute the optimizer update Weights, bias or beta, gamma tensors are not included in this list. MLCompute automatically adds them to the parameter list based on whether the layer is marked as updatable or not.- Parameters:
parameters- The list of input tensors to be updated by the optimizer- Returns:
- A boolean indicating success or failure
-
setVersion_static
public static void setVersion_static(long aVersion)
Deprecated.
-
sourceGradientTensorsForLayer
@NotNull public @NotNull NSArray<? extends MLCTensor> sourceGradientTensorsForLayer(@NotNull @NotNull MLCLayer layer)
Deprecated.Get the source gradient tensors for a layer in the training graph- Parameters:
layer- A layer in the training graph- Returns:
- A list of tensors
-
stopGradientForTensors
public boolean stopGradientForTensors(@NotNull @NotNull NSArray<? extends MLCTensor> tensors)Deprecated.Add the list of tensors whose contributions are not to be taken when computing gradients during gradient pass- Parameters:
tensors- The list of tensors- Returns:
- A boolean indicating success or failure
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
Deprecated.
-
synchronizeUpdates
public void synchronizeUpdates()
Deprecated.Synchronize updates (weights/biases from convolution, fully connected and LSTM layers, tensor parameters) from device memory to host memory.
-
version_static
public static long version_static()
Deprecated.
-
useStoredAccessor
@Deprecated public static boolean useStoredAccessor()
Deprecated.
-
-