I just tried it out with 1.6.0 but it seems your commit did not make it into it (or the issue is elsewhere  )
On the other hand, thank you very much for mentioning torch.no_grad()! It was a feature I was not aware of yet, and helped me out tremendously.