Erase shape information from class types (#23362)
Summary:
](https://our.intern.facebook.com/intern/diff/16681944/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/23362
Pulled By: driazati
Differential Revision: D16681944
fbshipit-source-id: dba46b6fc3223a2f94dc502531df438f3212d8fb