TensorFlow.js Operations (Cont.)
Tensor Division
You can divide two tensors using tensorA.div(tensorB)
function:
Tensor Square
You can square a tensor using
tensorA.square()
function:
Tensor Reshape
The number of elements in a tensor is the product of the sizes in the shape.
Since there can be different shapes with the same size, it is often useful to reshape a tensor to other shapes with the same size.
You can reshape a tensor using
tensor.reshape()
: