compileOptimizer(_:)
Compiles the optimizer to use with a training graph you specify.
Declaration
func compileOptimizer(_ optimizer: MLCOptimizer) -> BoolParameters
- optimizer:
The optimizer.
Return Value
true if the operation was successful.
Discussion
Typically you specify the optimizer to use with a training graph when creating the training graph, using init(graphObjects:lossLayer:optimizer:). The optimizer is then compiled in when you call compile(options:device:).
Alternatively, if the optimizer isn’t known when the framework creates or compiles the training graph, you can use this method to associate and compile in an optimizer.