MCPcopy
hub / github.com/tensorflow/tfjs / buffer

Method buffer

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

* Returns a promise of `tf.TensorBuffer` that holds the underlying data. * * @doc {heading: 'Tensors', subheading: 'Classes'}

()

Source from the content-addressed store, hash-verified

305 * @doc {heading: 'Tensors', subheading: 'Classes'}
306 */
307 async buffer<D extends DataType = 'float32'>(): Promise<TensorBuffer<R, D>> {
308 const vals = await this.data<D>();
309 return opHandler.buffer(this.shape, this.dtype as D, vals);
310 }
311
312 /**
313 * Returns a `tf.TensorBuffer` that holds the underlying data.

Callers

nothing calls this directly

Calls 1

bufferMethod · 0.65

Tested by

no test coverage detected