Tensorflow.js tf.TensorBuffer Class .set() Method
Tensorflow.js is an open-source library developed by Google for running machine learning models and deep learning neural networks in the browser or node environment.
The tf.TensorBuffer class .set() function is used to set a given value in the buffer at a specified location.
set (value, ...locations)
Parameters: This function accepts two parameters which are illustrated below:
- value: The specified value to set.
- locations: The specified location indices.
Return Value: It does not return any value.
Tensor [[5 , 0], [10, 0]]
Tensor [[5 , 10, 0 ], [15, 20, 0 ], [25, 30, 35]]