You could check, if the computation graph is detached by checking all parameters for a valid gradient after calling loss.backward() e.g. via:
for param in model.parameters():
    print(param.grad)

If some of them are None, you might be detaching the graph.
Otherwise, I would recommend to try to overfit a small dataset (e.g. just 10 samples) and make sure your model is able to overfit it by playing around with the hyper-parameters, model architecture etc.