I am trying to get the shape of a tensor in TensorFlow js but am unable to do so. Any help would be appreciated
Did you try?:
tf.shape
Where tf is your tensor, you can read more about this function at the tensorflow documentation