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():

     





      My wife and I were out to dinner and the waitress started flirting with me.    
      “She obviously has COVID,” my wife said.    
      “Why?” I asked.    
      My wife replied with a sneer, “Because she has no taste.”