Add "ndim" property to tensor (#20565)
Summary:
For compatibility with numpy.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20565
Differential Revision: D15374390
Pulled By: umanwizard
fbshipit-source-id: 4ab209a5fb27d8ba27ee7eb6b67b858ce2480594