TensorFlow.js Tutorial (Cont.)


Retrieving Tensor Values (Cont.)
You can get the shape of a tensor using tensor.shape() method:

     


You can get the datatype of a tensor using tensor.dtype() method:

     


Tensor Data Types
A tensor can have the following data types: (i) bool, (ii) int32, (iii) float32 (default), (iv) complex64, and (v) string. When you create a tensor, you can specify the data type as the third parameter:

     





      I have locked the door.    
      They are as safe as houses (very safe).