Zeroing out the values in each iteration will reset these parameters and would thus probably work.
However, your first approach of zeroing out the gradients should also work, I think.
Did self.theta.grad[0, 1] = 0. give you any errors?
You could also use self.theta.register_hook and zero out the gradients using the mask.