Solved by smth in post #2 
              
              
                so, i think i know the problem. let’s see. 
you are doing this, to signal that your model requires gradients: 
outputs = torch.tensor(outputs, requires_grad=True)

A tensor constructor torch.tensor(outputs, requires_grad=True) has taken outputs here which are lists of Tensors. The constructor doesn’…