Conv2d contains two parameters that get saved in the state_dict: weight and bias. I want to add a new parameter of the same shape as bias (purpose is irrelevant here) that also gets saved in the state_dict. Currently, I am saving the parameter in the module itself in a nn.ParameterList of the same length as the number of Conv2d layers I have. However, I would prefer to have the parameter stored inside the Conv2d layer it belongs to.
How and where do I have to modify Conv2d to add my custom parameter?