async _executeAsync(inputs, outputs, isFunctionExecution = false, tensorArrayMap = {}, tensorListMap = {}) {
          if (!isFunctionExecution) {
              inputs = this.mapInputs(inputs);
              this.checkInputs(inputs);
              this.checkInputShapeAndType(inputs);
              outputs = this.mapOutputs(outputs);
              this.checkOutputs(outputs);
          }
          const context = new ExecutionContext(this.weightMap, tensorArrayMap, tensorListMap, this.functionExecutorMap);
          // Graph with control flow op requires runtime evaluation of the execution
          // order, while without control flow the execution order is pre-determined
          // in the compile method.
          const tensorMap = await this.executeWithControlFlow(inputs, context, outputs, isFunctionExecution);
          const results = outputs.map(name => getTensor(name, tensorMap, context));
          // dispose all the intermediate tensors
          const outputIds = results.map(t => t.id);
          const inputIds = Object.keys(inputs).map(name => inputs[name].id);
          const keepIds = new Set([...outputIds, ...inputIds, ...this.weightIds]);
          Object.keys(tensorMap).forEach(key => {
              const tensorArray = tensorMap[key];
              tensorArray.forEach(tensor => {
                  if (tensor && !tensor.isDisposed && !keepIds.has(tensor.id)) {
                      tensor.dispose();
                  }
              });
          });
          // dispose the context for the root executor
          if (this.parent == null) {
              context.dispose(keepIds);
          }
          return results;
      }
/**
       * Executes the inference for given input tensors in Async fashion.
       * @param inputs Tensor map for the model inputs, keyed by the input node
       * names.
       * @param outputs Optional. output node name from the Tensorflow model,
       * if no outputs are specified, the default outputs of the model would be
       * used. You can inspect intermediate nodes of the model by adding them to the
       * outputs array.
       * @param isFunctionExecution Optional. Flag for executing a function.
       * @param tensorArrayMap Optional, global TensorArray map by id. Used for
       * function execution.
       * @param tensorArrayMap Optinal global TensorList map by id. Used for
       * function execution.
       */
Executes the inference for given input tensors in Async fashion.
@param inputs Tensor map for the model inputs, keyed by the input node
names.
@param outputs Optional. output node name from the Tensorflow model,
if no outputs are specified, the default outputs of the model would be
used. You can inspect intermediate nodes of the model by adding them to the
outputs array.
Executes the inference for given input tensors in Async fashion . @param inputs Tensor map for the model inputs keyed by the input node names . @param outputs Optional . output node name from the Tensorflow model if no outputs are specified the default outputs of the model would be used . You can inspect intermediate nodes of the model by adding them to the outputs array .
async _executeAsync(inputs, outputs, isFunctionExecution = false, tensorArrayMap = {}, tensorListMap = {}) {
          if (!isFunctionExecution) {
              inputs = this.mapInputs(inputs);
              this.checkInputs(inputs);
              this.checkInputShapeAndType(inputs);
              outputs = this.mapOutputs(outputs);
              this.checkOutputs(outputs);
          }
          const context = new ExecutionContext(this.weightMap, tensorArrayMap, tensorListMap, this.functionExecutorMap);
          const tensorMap = await this.executeWithControlFlow(inputs, context, outputs, isFunctionExecution);
          const results = outputs.map(name => getTensor(name, tensorMap, context));
          const outputIds = results.map(t => t.id);
          const inputIds = Object.keys(inputs).map(name => inputs[name].id);
          const keepIds = new Set([...outputIds, ...inputIds, ...this.weightIds]);
          Object.keys(tensorMap).forEach(key => {
              const tensorArray = tensorMap[key];
              tensorArray.forEach(tensor => {
                  if (tensor && !tensor.isDisposed && !keepIds.has(tensor.id)) {
                      tensor.dispose();
                  }
              });
          });
          if (this.parent == null) {
              context.dispose(keepIds);
          }
          return results;
      }
async _executeAsync ( inputs , outputs , isFunctionExecution = false , tensorArrayMap = { } , tensorListMap = { } ) { if ( ! isFunctionExecution ) { inputs = this . mapInputs ( inputs ) ; this . checkInputs ( inputs ) ; this . checkInputShapeAndType ( inputs ) ; outputs = this . mapOutputs ( outputs ) ; this . checkOutputs ( outputs ) ; } const context = new ExecutionContext ( this . weightMap , tensorArrayMap , tensorListMap , this . functionExecutorMap ) ; const tensorMap = await this . executeWithControlFlow ( inputs , context , outputs , isFunctionExecution ) ; const results = outputs . map ( name => getTensor ( name , tensorMap , context ) ) ; const outputIds = results . map ( t => t . id ) ; const inputIds = Object . keys ( inputs ) . map ( name => inputs [ name ] . id ) ; const keepIds = new Set ( [ ... outputIds , ... inputIds , ... this . weightIds ] ) ; Object . keys ( tensorMap ) . forEach ( key => { const tensorArray = tensorMap [ key ] ; tensorArray . forEach ( tensor => { if ( tensor && ! tensor . isDisposed && ! keepIds . has ( tensor . id ) ) { tensor . dispose ( ) ; } } ) ; } ) ; if ( this . parent == null ) { context . dispose ( keepIds ) ; } return results ; }
Executes the inference for given input tensors in Async fashion.
Executes the inference for given input tensors in Async fashion .
// Graph with control flow op requires runtime evaluation of the execution // order, while without control flow the execution order is pre-determined // in the compile method. // dispose all the intermediate tensors // dispose the context for the root executor