Contents

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 -> TimeInterval

Parameters

  • 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