This could happen, yes.
To check it:

print the .grad attribute of all parameter before the first backward operation: all should show None

perform the forward and backward pass
print the .grad attribute again and make sure all used paramters show a valid gradient

If that’s the case, the computation graph doesn’t seem to be detached.