Yes, you need to make networks C parameters non-leaf variable by setting their requires_grad field to False.
Glad it works !
I don’t think adding a requires_grad argument to the nn.Module creation would be useful as this is not the intended use for nn.Module. They are supposed to be learnable components only.