How to track shapes

I have lots of miss dimensional errors these day.
As I am using PyCharm, I thought there would be a debugging functionalities for numpy or tensors shape.

But the Pycharm debugger only provide the value it self of any variables.
Anyone knows a way to see the dimensions of variables during debugging session?

1 Like

Can you post an example of your problem?

From what I understand, torch.dim() should solve your problem.

just add .size() to and tensor get the dimensions. If you want to see it with PyCharm you should click on view (you can see it on the right side when pointing at the tensor) and the dimensions should be at the bottom, below the values.