'How do you find the shape of a tensor in tensorflow js?

I am trying to get the shape of a tensor in TensorFlow js but am unable to do so. Any help would be appreciated



Solution 1:[1]

Did you try?:

tf.shape

Where tf is your tensor.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ziur Olpa