In theano, we have lasagne.layer function to do the trick. How can we do the same to save each layers’ parameters in Pytorch???
The typical method of saving model parameters is to use
torch.save() to save
I guess you could loop through the layers of the model, calling
layer.state_dict() on each layer, then run
.cpu().numpy() on each weight array, and then save them with numpy.