* Returns a promise of `tf.TensorBuffer` that holds the underlying data. * * @doc {heading: 'Tensors', subheading: 'Classes'}
()
| 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. |