albanD:

You could use the  .apply()  method on network C just after creating it with a function that sets all parameters to not require grad. Or loop through it’s parameters and set it by hand.


But then why not allow for an option to set it while the parameters get initialised. I don’t think it would cause a problem for the regular use as trainable parameters. So is there any reason why we shouldn’t have it? I am supporting it since it makes defining non-trainable nets cleaner.