async _executeAsync(inputs, outputs, isFunctionExecution = false, tensorArrayMap = {}, tensorListMap = {}) {
        // Dispose any tensors from a prior run to avoid leaking them.
        this.disposeIntermediateTensors();
        if (!isFunctionExecution) {
            inputs = this.mapInputs(inputs);
            this.checkInputs(inputs);
            this.checkInputShapeAndType(inputs);
            outputs = this.mapOutputs(outputs);
            this.checkOutputs(outputs);
        }
        // Keep tensors if KEEP_INTERMEDIATE_TENSORS is on.
        try {
            this.keepIntermediateTensors = (0, _tfjsCore.env)().getBool("KEEP_INTERMEDIATE_TENSORS");
        } catch (e) {
            this.keepIntermediateTensors = false;
            console.warn(e.message);
        }
        const context = new (0, _executionContext.ExecutionContext)(this.weightMap, tensorArrayMap, tensorListMap, this.functionExecutorMap, this.parseNodeNameCache);
        if (this.keepIntermediateTensors) this.clonedTensorsMap = this.cloneTensorMap(this.weightMap);
        // 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 tensorsMap = await this.executeWithControlFlow(inputs, context, outputs, isFunctionExecution);
        const results = outputs.map((name)=>(0, _utils.getTensor)(name, tensorsMap, 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.values(tensorsMap).forEach((tensorsList)=>{
            tensorsList.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 Optional global TensorList map by id. Used for
function execution.