Let's say I have written a NetChain machine learning setup, trained the chain with NetTrain and obtained a model ready to predict:

model = NetChain[...];
trained = NetTrain[model,...];

The whole process took a long time to prepare, so I do not want to repeat the same preparation steps the next time I start Mathematica. Is there a way to save trained and load from memory instead of recreating it?

  • 1
    $\begingroup$ Pretty sure you can just save it via the normal routes, e.g. .m, .mx, compressed string, byte array. $\endgroup$ – b3m2a1 Sep 4 '17 at 5:10


Just use Import on the same file to reload into memory.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.