execute(inputsData:lossLabelsData:lossLabelWeightsData:batchSize:options:completionHandler:)
Executes the inference graph with the input data, batch size, execution options and completion handler you specify.
Declaration
func execute(inputsData: [String : MLCTensorData], lossLabelsData: [String : MLCTensorData]?, lossLabelWeightsData: [String : MLCTensorData]?, batchSize: Int, options: MLCExecutionOptions = [], completionHandler: MLCGraphCompletionHandler? = nil) -> BoolParameters
- inputsData:
A dictionary that contains input data.
- lossLabelsData:
A dictionary that contains loss label data.
- lossLabelWeightsData:
A dictionary that contains loss label weight data.
- batchSize:
The batch size.
- options:
The execution options.
- completionHandler:
The completion handler.
Return Value
true if the execution was successful.
Discussion
When executing an inference graph, if an optimizer is specified, the optimizer update is applied.
For variable length sequences for LSTMs/RNNs, use the key “sortedSequenceLengths” and pass in tensor data created by using one of the MLCTensor sequence length initializers as the value.
If synchronous is specified in options, this method returns after the graph is executed. Otherwise, this method returns after the graph is queued for execution. The completion handler is called after the graph has finished execution.
See Also
Executing Inference Graphs
execute(inputsData:batchSize:options:completionHandler:)execute(inputsData:outputsData:batchSize:options:completionHandler:)execute(inputsData:lossLabelsData:lossLabelWeightsData:outputsData:batchSize:options:completionHandler:)execute(inputsData:lossLabelsData:lossLabelWeightsData:outputsData:batchSize:options:)MLCExecutionOptionsMLCGraphCompletionHandler