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

Viewed 107

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

1 Answers

Did you try?:

tf.shape

Where tf is your tensor, you can read more about this function at the tensorflow documentation

Related