Thanks for the update.
In that case the code should be working find.
You could disable the gradient calculation for model by setting the .requires_grad attribute of all parameters to False, but this shouldn’t change the overall work flow.
To make sure the modelFCNN is getting valid gradients, you could check them after the backward() call via:
for name, param in modelFCNN.named_parameters():
    print(name, param.grad)

If you are seeing any None gradients, this would mean that this particular parameter doesn’t get valid gradients and there might be a bug in the code.