Tensorflow.js tf.reverse() Function
The tf.stack() function is used to reverse a tf.tensors along a specific axis.
tf.stack (x, axis)
- x: An input tensor to be reversed.
- axis: The set of dimensions to be set.
Return Value: This function returns tf.Tensor.
Tensor [1, 2, 3, 4]
Tensor [[1, 2], [3, 4], [5, 6]]