Each forward pass will create a new computation graph.
To double check your use case, you can print the gradients via:
for name, param in net.named_parameters():
    print(name, param.grad)

You can print it at different places to see, if the gradients are valid or have been zeroed out.