MCPcopy Index your code
hub / github.com/tensorflow/tfjs / dataToGPU

Method dataToGPU

tfjs-core/src/tensor.ts:400–403  ·  view source on GitHub ↗

* Copy the tensor's data to a new GPU resource. Comparing to the `dataSync()` * and `data()`, this method prevents data from being downloaded to CPU. * * For WebGL backend, the data will be stored on a densely packed texture. * This means that the texture will use the RGBA channels to st

(options?: DataToGPUOptions)

Source from the content-addressed store, hash-verified

398 * @doc {heading: 'Tensors', subheading: 'Classes'}
399 */
400 dataToGPU(options?: DataToGPUOptions): GPUData {
401 this.throwIfDisposed();
402 return trackerFn().readToGPU(this.dataId, options);
403 }
404
405 /**
406 * Synchronously downloads the values from the `tf.Tensor`. This blocks the

Callers

nothing calls this directly

Calls 2

throwIfDisposedMethod · 0.95
readToGPUMethod · 0.65

Tested by

no test coverage detected