executeGradient(batchSize:options:outputsData:)
Executes the gradient pass of the training graph with the batch size, execution options, and output data you specify.
Declaration
@discardableResult func executeGradient(batchSize: Int, options: MLCExecutionOptions = [], outputsData: [String : MLCTensorData]? = nil) async throws -> TimeIntervalParameters
- batchSize:
The batch size.
- options:
The execution options.
- outputsData:
A dictionary that contains output data.
Return Value
The execution time if you specify profiling.
See Also
Executing Forward, Gradient, and Optimizer Updates
executeForward(batchSize:options:completionHandler:)executeForward(batchSize:options:outputsData:completionHandler:)executeForward(batchSize:options:outputsData:)executeGradient(batchSize:options:completionHandler:)executeGradient(batchSize:options:outputsData:completionHandler:)executeOptimizerUpdate(options:completionHandler:)executeOptimizerUpdate(options:)synchronizeUpdates()setTrainingTensorParameters(_:)MLCExecutionOptionsMLCGraphCompletionHandler