shouldExecuteOnCPU(inputs, sizeThreshold = CPU_HANDOFF_SIZE_THRESHOLD) {
        const cpuBackend = this.getCPUBackend();
        if (!this.warnedAboutCPUBackend && cpuBackend == null) {
            console.warn('Your application contains ops that are small enough to be ' +
                'executed on the CPU backend, however the CPU backend cannot ' +
                'be found. Consider importing the CPU backend ' +
                '(@tensorflow/tfjs-backend-cpu) for better performance.');
            this.warnedAboutCPUBackend = true;
        }
        return cpuBackend != null &&
            inputs.every(input => this.texData.get(input.dataId).texture == null &&
                util.sizeFromShape(input.shape) < sizeThreshold);
    }
/*
    Tests whether all the inputs to an op are small and on the CPU. This heuristic
    determines when it would be faster to execute a kernel on the CPU. WebGL
    kernels opt into running this check and forwarding when appropriate.
    TODO(https://github.com/tensorflow/tfjs/issues/872): Develop a more
    sustainable strategy for optimizing backend execution of ops.
     */
Tests whether all the inputs to an op are small and on the CPU. This heuristic
determines when it would be faster to execute a kernel on the CPU. WebGL
kernels opt into running this check and forwarding when appropriate.
TODO: Develop a more
sustainable strategy for optimizing backend execution of ops.
Tests whether all the inputs to an op are small and on the CPU . This heuristic determines when it would be faster to execute a kernel on the CPU . WebGL kernels opt into running this check and forwarding when appropriate . TODO : Develop a more sustainable strategy for optimizing backend execution of ops .
shouldExecuteOnCPU(inputs, sizeThreshold = CPU_HANDOFF_SIZE_THRESHOLD) {
        const cpuBackend = this.getCPUBackend();
        if (!this.warnedAboutCPUBackend && cpuBackend == null) {
            console.warn('Your application contains ops that are small enough to be ' +
                'executed on the CPU backend, however the CPU backend cannot ' +
                'be found. Consider importing the CPU backend ' +
                '(@tensorflow/tfjs-backend-cpu) for better performance.');
            this.warnedAboutCPUBackend = true;
        }
        return cpuBackend != null &&
            inputs.every(input => this.texData.get(input.dataId).texture == null &&
                util.sizeFromShape(input.shape) < sizeThreshold);
    }
shouldExecuteOnCPU ( inputs , sizeThreshold = CPU_HANDOFF_SIZE_THRESHOLD ) { const cpuBackend = this . getCPUBackend ( ) ; if ( ! this . warnedAboutCPUBackend && cpuBackend == null ) { console . warn ( 'Your application contains ops that are small enough to be ' + 'executed on the CPU backend, however the CPU backend cannot ' + 'be found. Consider importing the CPU backend ' + '(@tensorflow/tfjs-backend-cpu) for better performance.' ) ; this . warnedAboutCPUBackend = true ; } return cpuBackend != null && inputs . every ( input => this . texData . get ( input . dataId ) . texture == null && util . sizeFromShape ( input . shape ) < sizeThreshold ) ; }
Tests whether all the inputs to an op are small and on the CPU.
Tests whether all the inputs to an op are small and on the CPU .