Clarify TypeError message (#5997)
Clarify TypeError message (#5997)

* Clarify TypeError message

* typo

* Wrap tye() in repr()

so that the type-check stfu

* Even better message

incidentally speeds up the thing, since all() possibly checked all elements and we don't.

Co-authored-by: Vasilis Vryniotis <d748cd3f763058dcf20e5489b9bc2373b78db68c@users.noreply.github.com>
pytorch/vision,pytorch/vision,pytorch/vision,pytorch/vision,pytorch/vision,pytorch/vision