createTensorFromGPUData(values, shape, dtype) {
        values.channels = values.channels || "RGBA";
        const { texture, height, width, channels } = values;
        const backend = (0, _tfjsCore.engine)().backend;
        // Have to throw an error, otherwise WebGL just warns and returns wrong
        // values.
        if (!backend.gpgpu.gl.isTexture(texture)) throw new Error(`The texture is invalid. Also, please make sure the texture and ` + `the TFJS WebGL backend are using the same canvas. If you want to ` + `use your own custom canvas, you have to create and use the custom ` + `TFJS WebGL backend created from the canvas through ` + `'new tf.MathBackendWebGL(customCanvas)'.`);
        const dataId = backend.writeTexture(texture, shape, dtype, height, width, channels);
        return (0, _tfjsCore.engine)().makeTensorFromDataId(dataId, shape, dtype, backend);
    }
Create a TF.js tensor out of an existing WebGL texture. A new texture will
be created.