Wow, I didn’t knew we had that. That is a very very very very dangerous function   We need to fix that.
The issue is slightly different here then: it uses .data (that should never be used!) and so break the computational graph. I’m afraid you won’t be able to use this function if you want gradient flowing back throw this update.