MCPcopy Create free account
hub / github.com/tensorflow/tfjs / executeAsync

Method executeAsync

tfjs-converter/src/executor/graph_model.ts:534–545  ·  view source on GitHub ↗

* 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[])

Source from the content-addressed store, hash-verified

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

Callers 6

predictAsyncMethod · 0.95
index.jsFile · 0.45
predictMethod · 0.45

Calls 4

normalizeInputsMethod · 0.95
normalizeOutputsMethod · 0.95

Tested by

no test coverage detected