Do you mean whatever the module is, as long as it’s inherited from base nn.Module class, simply calling the default model.zero_grad() is enough?
I mean the error can pass from other Variable to the parameter,  if some Variable’s grad is unintentionally accumulated from the last run, the gradient of parameters may also be wrong.