prohibit assignment to a sparse tensor (#50040)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/48225 by prohibiting assignment to a sparse Tensor.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/50040
Reviewed By: mrshenli
Differential Revision: D25757125
Pulled By: zou3519
fbshipit-source-id: 3db6f48932eb10bf6ca5e97a6091afcabb60e478