Sorry to revive an old topic. But I have kind of the same question:
Is there an easy way to set requires_grad simultaneously to all the parameters associated with a module (recursively if said module contains other modules)?