Solved by Nikronic in post #4 
              
              
                Hi, 
First of all, could you please reformat your code section using ```??? 
It is really hard to read. 
And note that Variable has been removed from PyTorch, and now if you want to enable gradient computing on a tensor use following snippet: 

b = torch.tensor([0.7])
b.requires_grad = True

But abo…