Is the loss not changing at all or just too slow?
You could check, if the computation graph was detached by printing all gradients after the backward call via:
for name, param in model.named_parameters():
    print(name, param.grad)

If some .grad attributes return a None value, you could have accidentally detached the graph somewhere.
On the other hand, if you see valid gradients for all parameters, I would recommend to scale down the use case a bit and try to overfit a small dataset (e.g. just 10 samples).
Once this is working, you could try to scale it up again.
PS: you can post code snippets by wrapping them into three backticks ```, which would make debugging easier.