There used to be a warning about this, but torch.tensor is bad here as it’ll treat the inputs as numbers rather than connecting them through autograd (and maybe needing the requires_grad=True should have given you a hint  ). Edit: Let me emphasize, that it’s a common enough thing to get this wrong, don’t be discouraged –  I know at least 20 people who think that you can never know enough about autograd.  
This (and not because it was aesthetically pleasing, it isn’t) was the reason I used the nested stack in the other thread. If you plug that back in, it’ll work a lot better.
Best regards
Thomas