Tensorflow.js tf.Tensor class .data() Method
The tf.Tensor class .data() method is used to asynchronously download the values from the tf.Tensor.
Parameters: It does not accept any parameter.
Return Value: It returns Promise <DataTypeMap[NumericDataType]>.
Example 2: Creating a 2d tensor