Package org.robovm.apple.mlcompute
Class MLCTrainingGraph
java.lang.Object
org.robovm.rt.bro.NativeObject
org.robovm.objc.ObjCObject
org.robovm.apple.foundation.NSObject
org.robovm.apple.mlcompute.MLCGraph
org.robovm.apple.mlcompute.MLCTrainingGraph
- All Implemented Interfaces:
NSObjectProtocol,ObjCProtocol
public class MLCTrainingGraph extends MLCGraph
- Since:
- Available in iOS 14.0 and later.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMLCTrainingGraph.MLCTrainingGraphPtrNested classes/interfaces inherited from class org.robovm.apple.mlcompute.MLCGraph
MLCGraph.MLCGraphPtrNested classes/interfaces inherited from class org.robovm.apple.foundation.NSObject
NSObject.Handle, NSObject.Marshaler, NSObject.NoRetainMarshaler, NSObject.NSKeyValueObserver, NSObject.NSObjectPtr, NSObject.SkipInitNested classes/interfaces inherited from class org.robovm.objc.ObjCObject
ObjCObject.ObjCObjectPtr, ObjCObject.Super -
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description MLCTrainingGraph()MLCTrainingGraph(NSArray<MLCGraph> graphObjects, MLCLayer lossLayer, MLCOptimizer optimizer)protectedMLCTrainingGraph(NSObject.Handle h, long handle)protectedMLCTrainingGraph(NSObject.SkipInit skipInit) -
Method Summary
Methods inherited from class org.robovm.apple.mlcompute.MLCGraph
bindAndWriteData, bindAndWriteData, concatenate, gather, getDevice, getLayers, getSummarizedDOTDescription, node, node, node, node, reshape, resultTensorsForLayer, scatter, select, sourceTensorsForLayer, split, split, transposeMethods inherited from class org.robovm.apple.foundation.NSObject
addKeyValueObserver, addKeyValueObserver, afterMarshaled, alloc, autorelease, autorelease, awakeFromNib, conformsToProtocol, copy, description, didChangeValue, didChangeValue, didChangeValues, doDispose, equals, forceSkipInit, getAutoContentAccessingProxy, getClassForCoder, getClassForKeyedArchiver, getKeyValueCoder, getObservationInfo, hash, hashCode, init, isEqual, isKindOfClass, isMemberOfClass, mutableCopy, performSelector, performSelector, performSelector, performSelector, performSelector, performSelector, performSelector, performSelectorInBackground, performSelectorOnMainThread, performSelectorOnMainThread, performSelectorV, performSelectorV, performSelectorV, release, release, removeKeyValueObserver, removeKeyValueObservers, respondsToSelector, retain, retain, retainCount, setObservationInfo, toString, willChangeValue, willChangeValue, willChangeValuesMethods inherited from class org.robovm.objc.ObjCObject
addStrongRef, dispose, dispose, finalize, getAssociatedObject, getObjCClass, getPeerObject, getSuper, initObject, logRetainRelease, removeStrongRef, retainCustomObjectFromCb, setAssociatedObject, toObjCObject, toObjCObject, updateStrongRef
-
Constructor Details
-
MLCTrainingGraph
public MLCTrainingGraph() -
MLCTrainingGraph
-
MLCTrainingGraph
-
MLCTrainingGraph
public MLCTrainingGraph(NSArray<MLCGraph> graphObjects, MLCLayer lossLayer, MLCOptimizer optimizer)
-
-
Method Details
-
getOptimizer
-
getDeviceMemorySize
public long getDeviceMemorySize() -
addInputs
public boolean addInputs(NSDictionary<NSString,MLCTensor> inputs, NSDictionary<NSString,MLCTensor> lossLabels) -
addInputs
public boolean addInputs(NSDictionary<NSString,MLCTensor> inputs, NSDictionary<NSString,MLCTensor> lossLabels, NSDictionary<NSString,MLCTensor> lossLabelWeights) -
addOutputs
-
stopGradientForTensors
-
compile
-
compile
public boolean compile(MLCGraphCompilationOptions options, MLCDevice device, NSDictionary<NSString,MLCTensor> inputTensors, NSDictionary<NSString,MLCTensorData> inputTensorsData)- Since:
- Available in iOS 14.5 and later.
-
compileOptimizer
-
link
-
gradientTensorForInput
-
sourceGradientTensorsForLayer
-
resultGradientTensorsForLayer
-
gradientData
-
allocateUserGradientForTensor
-
execute
public boolean execute(NSDictionary<NSString,MLCTensorData> inputsData, NSDictionary<NSString,MLCTensorData> lossLabelsData, NSDictionary<NSString,MLCTensorData> lossLabelWeightsData, long batchSize, MLCExecutionOptions options, VoidBlock3<MLCTensor,NSError,Double> completionHandler) -
execute
public boolean execute(NSDictionary<NSString,MLCTensorData> inputsData, NSDictionary<NSString,MLCTensorData> lossLabelsData, NSDictionary<NSString,MLCTensorData> lossLabelWeightsData, NSDictionary<NSString,MLCTensorData> outputsData, long batchSize, MLCExecutionOptions options, VoidBlock3<MLCTensor,NSError,Double> completionHandler) -
executeForward
public boolean executeForward(long batchSize, MLCExecutionOptions options, VoidBlock3<MLCTensor,NSError,Double> completionHandler) -
executeForward
public boolean executeForward(long batchSize, MLCExecutionOptions options, NSDictionary<NSString,MLCTensorData> outputsData, VoidBlock3<MLCTensor,NSError,Double> completionHandler) -
executeGradient
public boolean executeGradient(long batchSize, MLCExecutionOptions options, VoidBlock3<MLCTensor,NSError,Double> completionHandler) -
executeGradient
public boolean executeGradient(long batchSize, MLCExecutionOptions options, NSDictionary<NSString,MLCTensorData> outputsData, VoidBlock3<MLCTensor,NSError,Double> completionHandler) -
executeOptimizerUpdate
public boolean executeOptimizerUpdate(MLCExecutionOptions options, VoidBlock3<MLCTensor,NSError,Double> completionHandler) -
synchronizeUpdates
public void synchronizeUpdates() -
setTrainingTensorParameters
-
bindOptimizerData
public boolean bindOptimizerData(NSArray<MLCTensorData> data, NSArray<MLCTensorOptimizerDeviceData> deviceData, MLCTensor tensor) -
create
protected static long create(NSArray<MLCGraph> graphObjects, MLCLayer lossLayer, MLCOptimizer optimizer) -
graph
-