Thank you very much for both the replies;
The code redundancy is annoying due to how some properties of the model must be changed for all models and some are model-dependant. However, in the end I am iterating different models and only a select few require to be stored long-term, and as so both of your suggestions may solve my problem. I will try to resolve my problem by storing each serialized weight table alongside the corresponding source code, and adapt the evaluation script to automatically load the corresponding model in the same folder.
Generating a model from a string description was my first attempt but I’ve run into some problems in implementation flexibility for less standard models (for example if they weren’t linear), however I’m sure it is achievable with some dedication, but I wondered if no standard solutions were available, hence this post.
Again, thank you very much for the help,