Model weights not being updated

Hey, I have the exact same error!

  1. My model doesn’t seem to be training.
  2. Upon checking a = list(model.parameters())[0].clone() and b = a = list(model.parameters())[0].clone() before and after the call to loss.backward() and optimizer.step(). a==b returns false
  3. Upon printing list(model.parameters())[0].grad it returns a matrix of all 0’s.

I’ve been struggling with this problem for 3 days now. Please help me out. The original question can be found at LSTM Model not training

@smth @apaszke @fmassa please take a look at this. I can share the complete code if I am missing out on providing some details now.