* Executes inference for the model for given input tensors in async * fashion, use this method when your model contains control flow ops. * @param inputs tensor, tensor array or tensor map of the inputs for the * model, keyed by the input node names. * @param outputs output node name fro
(
inputs: Tensor|Tensor[]|NamedTensorMap,
outputs?: string|string[])
| 532 | * @doc {heading: 'Models', subheading: 'Classes'} |
| 533 | */ |
| 534 | async executeAsync( |
| 535 | inputs: Tensor|Tensor[]|NamedTensorMap, |
| 536 | outputs?: string|string[]): Promise<Tensor|Tensor[]> { |
| 537 | if (this.resourceIdToCapturedInput == null) { |
| 538 | this.setResourceIdToCapturedInput( |
| 539 | await this.executeInitializerGraphAsync()); |
| 540 | } |
| 541 | inputs = this.normalizeInputs(inputs); |
| 542 | outputs = this.normalizeOutputs(outputs); |
| 543 | const result = await this.executor.executeAsync(inputs, outputs); |
| 544 | return result.length > 1 ? result : result[0]; |
| 545 | } |
| 546 | |
| 547 | /** |
| 548 | * Get intermediate tensors for model debugging mode (flag |
no test coverage detected