Amazing!
I try your way and install the latest version from the current github, then the bug vanishes!
(But the install page of pytorch  still stays in version 0.2.0_3, in which the bug still stays, should we update it?)
Thanks a lot! Now I can go on recommending pytorch in our lab!