Better error when module attr is used (#18164)
authorElias Ellison <eellison@fb.com>
Sat, 23 Mar 2019 03:13:02 +0000 (20:13 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sat, 23 Mar 2019 03:22:27 +0000 (20:22 -0700)
commit7c2290e7cee76591c1990fa60e4c4c223ab71012
tree3871c91de46d6ac5b209b8b7d85048c8d9b51f58
parent7be05b822c01e8db5e23c8a213ba2e83d17b0bd2
Better error when module attr is used (#18164)

Summary:
Adds a suggestion to add to __constants__ when a torch.nn.Module attr is accessed
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18164

Differential Revision: D14580060

Pulled By: eellison

fbshipit-source-id: 0c5adc21d7341a5691d4b45930947cb1ba84c8e8
test/test_jit.py
torch/csrc/jit/script/init.cpp