improve error message on inferred type (#21058)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/21058
ghimport-source-id: 7fad3a0567022dd417f4bd079a50a22e3c1dc020
Differential Revision: D15547218
Pulled By: suo
fbshipit-source-id: 5dbd567c79e6d01e9af4b8552777f7f0043df5b2