Package apple.mlcompute
Class MLCGraph
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.mlcompute.MLCGraph
-
- All Implemented Interfaces:
NSObject
- Direct Known Subclasses:
MLCInferenceGraph,MLCTrainingGraph
@Deprecated public class MLCGraph extends NSObject
Deprecated.MLCGraph A graph of layers that can be used to build a training or inference graph API-Since: 14.0 Deprecated-Since: 100000.0 Deprecated-Message: Use Metal Performance Shaders Graph or BNNS instead.
-
-
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 protectedMLCGraph(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 MLCGraphalloc()Deprecated.static MLCGraphallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)Deprecated.static booleanautomaticallyNotifiesObserversForKey(@NotNull java.lang.String key)Deprecated.booleanbindAndWriteDataForInputsToDeviceBatchSizeSynchronous(@NotNull NSDictionary<java.lang.String,? extends MLCTensorData> inputsData, @NotNull NSDictionary<java.lang.String,? extends MLCTensor> inputTensors, @NotNull MLCDevice device, long batchSize, boolean synchronous)Deprecated.Associates data with input tensors.booleanbindAndWriteDataForInputsToDeviceSynchronous(@NotNull NSDictionary<java.lang.String,? extends MLCTensorData> inputsData, @NotNull NSDictionary<java.lang.String,? extends MLCTensor> inputTensors, @NotNull MLCDevice device, boolean synchronous)Deprecated.Associates data with input tensors.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.@Nullable MLCTensorconcatenateWithSourcesDimension(@NotNull NSArray<? extends MLCTensor> sources, long dimension)Deprecated.Add a concat layer to the graphstatic java.lang.StringdebugDescription_static()Deprecated.static java.lang.Stringdescription_static()Deprecated.@Nullable MLCDevicedevice()Deprecated.The device to be used when compiling and executing a graph@Nullable MLCTensorgatherWithDimensionSourceIndices(long dimension, @NotNull MLCTensor source, @NotNull MLCTensor indices)Deprecated.Add a gather layer to the graphstatic MLCGraphgraph()Deprecated.Creates a new graph.static longhash_static()Deprecated.MLCGraphinit()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 NSArray<? extends MLCLayer>layers()Deprecated.Layers in the graphstatic MLCGraphnew_objc()Deprecated.@Nullable MLCTensornodeWithLayerSource(@NotNull MLCLayer layer, @NotNull MLCTensor source)Deprecated.Add a layer to the graph@Nullable MLCTensornodeWithLayerSources(@NotNull MLCLayer layer, @NotNull NSArray<? extends MLCTensor> sources)Deprecated.Add a layer to the graph For variable length sequences of LSTMs/RNNs layers, create an MLCTensor of sortedSequenceLengths and pass it as the last index (i.e.@Nullable MLCTensornodeWithLayerSourcesDisableUpdate(@NotNull MLCLayer layer, @NotNull NSArray<? extends MLCTensor> sources, boolean disableUpdate)Deprecated.Add a layer to the graph For variable length sequences of LSTMs/RNNs layers, create an MLCTensor of sortedSequenceLengths and pass it as the last index (i.e.@Nullable MLCTensornodeWithLayerSourcesLossLabels(@NotNull MLCLayer layer, @NotNull NSArray<? extends MLCTensor> sources, @NotNull NSArray<? extends MLCTensor> lossLabels)Deprecated.Add a loss layer to the graph For variable length sequences of LSTMs/RNNs layers, create an MLCTensor of sortedSequenceLengths and pass it as the last index (i.e.@Nullable MLCTensorreshapeWithShapeSource(@NotNull NSArray<? extends NSNumber> shape, @NotNull MLCTensor source)Deprecated.Add a reshape layer to the graphstatic booleanresolveClassMethod(org.moe.natj.objc.SEL sel)Deprecated.static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)Deprecated.@NotNull NSArray<? extends MLCTensor>resultTensorsForLayer(@NotNull MLCLayer layer)Deprecated.Get the result tensors for a layer in the training graph@Nullable MLCTensorscatterWithDimensionSourceIndicesCopyFromReductionType(long dimension, @NotNull MLCTensor source, @NotNull MLCTensor indices, @NotNull MLCTensor copyFrom, int reductionType)Deprecated.Add a scatter layer to the graph@Nullable MLCTensorselectWithSourcesCondition(@NotNull NSArray<? extends MLCTensor> sources, @NotNull MLCTensor condition)Deprecated.Add a select layer to the graphstatic voidsetVersion_static(long aVersion)Deprecated.@NotNull NSArray<? extends MLCTensor>sourceTensorsForLayer(@NotNull MLCLayer layer)Deprecated.Get the source tensors for a layer in the training graph@Nullable NSArray<? extends MLCTensor>splitWithSourceSplitCountDimension(@NotNull MLCTensor source, long splitCount, long dimension)Deprecated.Add a split layer to the graph@Nullable NSArray<? extends MLCTensor>splitWithSourceSplitSectionLengthsDimension(@NotNull MLCTensor source, @NotNull NSArray<? extends NSNumber> splitSectionLengths, long dimension)Deprecated.Add a split layer to the graph@NotNull java.lang.StringsummarizedDOTDescription()Deprecated.A DOT representation of the graph.static org.moe.natj.objc.Classsuperclass_static()Deprecated.@Nullable MLCTensortransposeWithDimensionsSource(@NotNull NSArray<? extends NSNumber> dimensions, @NotNull MLCTensor source)Deprecated.Add a transpose layer to the graphstatic 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 MLCGraph alloc()
Deprecated.
-
allocWithZone
public static MLCGraph allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
Deprecated.
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(@NotNull @NotNull java.lang.String key)Deprecated.
-
bindAndWriteDataForInputsToDeviceBatchSizeSynchronous
public boolean bindAndWriteDataForInputsToDeviceBatchSizeSynchronous(@NotNull @NotNull NSDictionary<java.lang.String,? extends MLCTensorData> inputsData, @NotNull @NotNull NSDictionary<java.lang.String,? extends MLCTensor> inputTensors, @NotNull @NotNull MLCDevice device, long batchSize, boolean synchronous)Deprecated.Associates data with input tensors. If the device is GPU, also copies the data to the device memory. Returns true if the data is successfully associated with input tensors. This function should be used if you execute the forward, gradient and optimizer updates independently. Before the forward pass is executed, the inputs should be written to device memory. Similarly, before the gradient pass is executed, the inputs (typically the initial gradient tensor) should be written to device memory. The caller must guarantee the lifetime of the underlying memory of each value of \p inputsData for the entirety of each corresponding input tensor's lifetime.- Parameters:
inputsData- The input data to use to write to device memoryinputTensors- The list of tensors to perform writes ondevice- The devicebatchSize- The batch size. This should be set to the actual batch size that may be used when we execute the graph and can be a value less than or equal to the batch size specified in the tensor. If set to 0, we use batch size specified in the tensor.synchronous- Whether to execute the copy to the device synchronously. For performance, asynchronous execution is recommended.- Returns:
- A Boolean value indicating whether the data is successfully associated with the tensor.
-
bindAndWriteDataForInputsToDeviceSynchronous
public boolean bindAndWriteDataForInputsToDeviceSynchronous(@NotNull @NotNull NSDictionary<java.lang.String,? extends MLCTensorData> inputsData, @NotNull @NotNull NSDictionary<java.lang.String,? extends MLCTensor> inputTensors, @NotNull @NotNull MLCDevice device, boolean synchronous)Deprecated.Associates data with input tensors. If the device is GPU, also copies the data to the device memory. Returns true if the data is successfully associated with input tensors. This function should be used if you execute the forward, gradient and optimizer updates independently. Before the forward pass is executed, the inputs should be written to device memory. Similarly, before the gradient pass is executed, the inputs (typically the initial gradient tensor) should be written to device memory. The caller must guarantee the lifetime of the underlying memory of each value of \p inputsData for the entirety of each corresponding input tensor's lifetime.- Parameters:
inputsData- The input data to use to write to device memoryinputTensors- The list of tensors to perform writes ondevice- The devicesynchronous- Whether to execute the copy to the device synchronously. For performance, asynchronous execution is recommended.- 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.
-
concatenateWithSourcesDimension
@Nullable public @Nullable MLCTensor concatenateWithSourcesDimension(@NotNull @NotNull NSArray<? extends MLCTensor> sources, long dimension)
Deprecated.Add a concat layer to the graph- Parameters:
sources- The source tensors to concatenatedimension- The concatenation dimension- Returns:
- A result tensor
-
debugDescription_static
public static java.lang.String debugDescription_static()
Deprecated.
-
description_static
public static java.lang.String description_static()
Deprecated.
-
device
@Nullable public @Nullable MLCDevice device()
Deprecated.The device to be used when compiling and executing a graph
-
gatherWithDimensionSourceIndices
@Nullable public @Nullable MLCTensor gatherWithDimensionSourceIndices(long dimension, @NotNull @NotNull MLCTensor source, @NotNull @NotNull MLCTensor indices)
Deprecated.Add a gather layer to the graph- Parameters:
dimension- The dimension along which to indexsource- The source tensorindices- The index of elements to gather- Returns:
- A result tensor API-Since: 14.5
-
graph
public static MLCGraph graph()
Deprecated.Creates a new graph.- Returns:
- A new graph.
-
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.
-
layers
@NotNull public @NotNull NSArray<? extends MLCLayer> layers()
Deprecated.Layers in the graph
-
new_objc
public static MLCGraph new_objc()
Deprecated.
-
nodeWithLayerSource
@Nullable public @Nullable MLCTensor nodeWithLayerSource(@NotNull @NotNull MLCLayer layer, @NotNull @NotNull MLCTensor source)
Deprecated.Add a layer to the graph- Parameters:
layer- The layersource- The source tensor- Returns:
- A result tensor
-
nodeWithLayerSources
@Nullable public @Nullable MLCTensor nodeWithLayerSources(@NotNull @NotNull MLCLayer layer, @NotNull @NotNull NSArray<? extends MLCTensor> sources)
Deprecated.Add a layer to the graph For variable length sequences of LSTMs/RNNs layers, create an MLCTensor of sortedSequenceLengths and pass it as the last index (i.e. index 2 or 4) of sources. This tensor must of be type MLCDataTypeInt32.- Parameters:
layer- The layersources- A list of source tensors- Returns:
- A result tensor
-
nodeWithLayerSourcesDisableUpdate
@Nullable public @Nullable MLCTensor nodeWithLayerSourcesDisableUpdate(@NotNull @NotNull MLCLayer layer, @NotNull @NotNull NSArray<? extends MLCTensor> sources, boolean disableUpdate)
Deprecated.Add a layer to the graph For variable length sequences of LSTMs/RNNs layers, create an MLCTensor of sortedSequenceLengths and pass it as the last index (i.e. index 2 or 4) of sources. This tensor must of be type MLCDataTypeInt32.- Parameters:
layer- The layersources- A list of source tensorsdisableUpdate- A flag to indicate if optimizer update should be disabled for this layer- Returns:
- A result tensor
-
nodeWithLayerSourcesLossLabels
@Nullable public @Nullable MLCTensor nodeWithLayerSourcesLossLabels(@NotNull @NotNull MLCLayer layer, @NotNull @NotNull NSArray<? extends MLCTensor> sources, @NotNull @NotNull NSArray<? extends MLCTensor> lossLabels)
Deprecated.Add a loss layer to the graph For variable length sequences of LSTMs/RNNs layers, create an MLCTensor of sortedSequenceLengths and pass it as the last index (i.e. index 2 or 4) of sources. This tensor must of be type MLCDataTypeInt32.- Parameters:
layer- The loss layerlossLabels- The loss labels tensor- Returns:
- A result tensor
-
reshapeWithShapeSource
@Nullable public @Nullable MLCTensor reshapeWithShapeSource(@NotNull @NotNull NSArray<? extends NSNumber> shape, @NotNull @NotNull MLCTensor source)
Deprecated.Add a reshape layer to the graph- Parameters:
shape- An array representing the shape of result tensorsource- The source tensor- Returns:
- A result tensor
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
Deprecated.
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
Deprecated.
-
resultTensorsForLayer
@NotNull public @NotNull NSArray<? extends MLCTensor> resultTensorsForLayer(@NotNull @NotNull MLCLayer layer)
Deprecated.Get the result tensors for a layer in the training graph- Parameters:
layer- A layer in the training graph- Returns:
- A list of tensors
-
scatterWithDimensionSourceIndicesCopyFromReductionType
@Nullable public @Nullable MLCTensor scatterWithDimensionSourceIndicesCopyFromReductionType(long dimension, @NotNull @NotNull MLCTensor source, @NotNull @NotNull MLCTensor indices, @NotNull @NotNull MLCTensor copyFrom, int reductionType)
Deprecated.Add a scatter layer to the graph- Parameters:
dimension- The dimension along which to indexsource- The updates to use with scattering with index positions specified in indices to result tensorindices- The index of elements to scattercopyFrom- The source tensor whose data is to be first copied to the result tensorreductionType- The reduction type applied for all values in source tensor that are scattered to a specific location in the result tensor. Must be: MLCReductionTypeNone or MLCReductionTypeSum.- Returns:
- A result tensor API-Since: 14.5
-
selectWithSourcesCondition
@Nullable public @Nullable MLCTensor selectWithSourcesCondition(@NotNull @NotNull NSArray<? extends MLCTensor> sources, @NotNull @NotNull MLCTensor condition)
Deprecated.Add a select layer to the graph- Parameters:
sources- The source tensorscondition- The condition mask- Returns:
- A result tensor API-Since: 14.5
-
setVersion_static
public static void setVersion_static(long aVersion)
Deprecated.
-
sourceTensorsForLayer
@NotNull public @NotNull NSArray<? extends MLCTensor> sourceTensorsForLayer(@NotNull @NotNull MLCLayer layer)
Deprecated.Get the source tensors for a layer in the training graph- Parameters:
layer- A layer in the training graph- Returns:
- A list of tensors
-
splitWithSourceSplitCountDimension
@Nullable public @Nullable NSArray<? extends MLCTensor> splitWithSourceSplitCountDimension(@NotNull @NotNull MLCTensor source, long splitCount, long dimension)
Deprecated.Add a split layer to the graph- Parameters:
source- The source tensorsplitCount- The number of splitsdimension- The dimension to split the source tensor- Returns:
- A result tensor
-
splitWithSourceSplitSectionLengthsDimension
@Nullable public @Nullable NSArray<? extends MLCTensor> splitWithSourceSplitSectionLengthsDimension(@NotNull @NotNull MLCTensor source, @NotNull @NotNull NSArray<? extends NSNumber> splitSectionLengths, long dimension)
Deprecated.Add a split layer to the graph- Parameters:
source- The source tensorsplitSectionLengths- The lengths of each split sectiondimension- The dimension to split the source tensor- Returns:
- A result tensor
-
summarizedDOTDescription
@NotNull public @NotNull java.lang.String summarizedDOTDescription()
Deprecated.A DOT representation of the graph. For more info on the DOT language, refer to https://en.wikipedia.org/wiki/DOT_(graph_description_language). Edges that have a dashed lines are those that have stop gradients, while those with solid lines don't.
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
Deprecated.
-
transposeWithDimensionsSource
@Nullable public @Nullable MLCTensor transposeWithDimensionsSource(@NotNull @NotNull NSArray<? extends NSNumber> dimensions, @NotNull @NotNull MLCTensor source)
Deprecated.Add a transpose layer to the graph- Parameters:
dimensions- NSArrayrepresenting the desired ordering of dimensions The dimensions array specifies the input axis source for each output axis, such that the K'th element in the dimensions array specifies the input axis source for the K'th axis in the output. The batch dimension which is typically axis 0 cannot be transposed. - Returns:
- A result tensor
-
version_static
public static long version_static()
Deprecated.
-
useStoredAccessor
@Deprecated public static boolean useStoredAccessor()
Deprecated.
-
-