Question 7/13 fast.ai v3 lecture 12

What do you need to call on an nn.Module to export its parameters, registered buffers, etc to a dictionary of values?

Answer

You need to call module.state_dict(). You can then save it using torch.save. Modules support loading of state using load_state_dict

Relevant part of lecture