So, I wrote a custom extension of BatchNorm where I keep track of multiple running_mean and running_vars in a dictionary.  The number of such mean and vars is not specified beforehand (e.g. can be 3 or 100), so I can’t replace them with a fixed number of parameters. The dictionary method works well for me except I cannot register my running_means and running_vars dictionary into the state dict for later reloading. Can someone suggest a workaround?