compile(options:device:inputTensors:inputTensorsData:)
Compiles the training graph for the options, device, and input tensors you specify.
Declaration
func compile(options: MLCGraphCompilationOptions = [], device: MLCDevice, inputTensors: [String : MLCTensor]?, inputTensorsData: [String : MLCTensorData]?) -> BoolParameters
- options:
The compiler options.
- device:
The device.
- inputTensors:
The list of input tensors that are constants.
- inputTensorsData:
The tensor data to use with the input tensors.
Return Value
A Boolean that indicates success or failure.
Discussion
If you specify the list of constant tensors before the framework compiles the graph, then the framework can perform additional optimizations during the compilation.