How does one store Pytorch models without having to store the parameters?

I want to only store the layers block and the computation graph.

To start off I want it to work for Sequential models. I want to be able to store the Sequential model architecture without having to store the parameters. Is that possible?

After that, is it generalizable for arbitrary models? I only want to store the shape and types of the pytorch graph. I don’t need the parameters.

I think the easiest way would be to store the model class definition, if you don’t want the parameters.

hmmm what does that mean? how does one do that?

I’ve been just saving the string of the Sequential model for the moment…but then I need to parse the string to extract things from it or even worse use an eval function…