How to save models and parameters to a zip file? Using numpy

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 model.state_dict()

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.