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

Method runSavedModel

tfjs-node/src/nodejs_kernel_backend.ts:484–498  ·  view source on GitHub ↗
(
      id: number, inputs: Tensor[], inputTensorInfos: ModelTensorInfo[],
      outputOpNames: string[])

Source from the content-addressed store, hash-verified

482 }
483
484 runSavedModel(
485 id: number, inputs: Tensor[], inputTensorInfos: ModelTensorInfo[],
486 outputOpNames: string[]): Tensor[] {
487 const {tensorIds, newTensors} =
488 this.getMappedInputTensorIds(inputs, inputTensorInfos);
489 const outputMetadata = this.binding.runSavedModel(
490 id, tensorIds, inputTensorInfos.map(info => info.name).join(','),
491 outputOpNames.join(','));
492 for (let i = 0; i < tensorIds.length; i++) {
493 if (newTensors.includes(i)) {
494 this.binding.deleteTensor(tensorIds[i]);
495 }
496 }
497 return outputMetadata.map(m => this.createOutputTensor(m));
498 }
499
500 // ------------------------------------------------------------
501 // TensorBoard-related (tfjs-node-specific) backend kernels.

Callers

nothing calls this directly

Calls 5

createOutputTensorMethod · 0.95
joinMethod · 0.80
deleteTensorMethod · 0.80
runSavedModelMethod · 0.65

Tested by

no test coverage detected