Yes, this would disable the gradient calculation in the script.
However, you should see a RuntimeError, if you are trying to calculate the gradients:
RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn

If this error is not raised, you might have re-enabled the gradient calculation later.