Difference between model_state_dict and generator_state_dict

I have seen some code where they use both model.model_state_dict() and model.generator_state_dict(). I know that model_state_dict gives you the weights of the model neural network but I am unsure about the latter (generator_state_dict) as I cannot find any documentation on this. Can anyone shed some light on to this or at least provide a link with the relevant documentation for the generator_state_dict?

Neither of these two methods is a built-in method of nn.Module, so you would need to look into the custom model definition and search for these functions.

nn.Module provides the .state_dict() method, which will return all registered parameters and buffers of this model.

1 Like