New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to save and load the fitted model architecture? #20
Comments
I have a stupid way of saving the model by:
But it only saves the model's architecture and weight/bias. It doesn't save optimizer information. How can I get the optimizer object? Anything like autonet.get_pytorch_optimizer()? There must be some smart way to do it. I just don't know. Please help. |
Hey, thank you for the kind words and the feedback. We will include a get_optimizer method soon, for now here is a workaround:
If you use the 'refit', the autonet will automatically use the incumbent configuration obtained in the last 'fit' call. |
Thank you very much, how can I tell the Autonet to use a fixed network architecture? like:
|
Thank you for your reply. Please have a look at my question about fix network architecture in refit function at your convenience. |
If you want to search on a specific space you could do, e.g.:
If you want to just fit a specific configuration, you pass a dictionary to a refit call:
I also recommend the jupyter notebook tutorial. |
Thank you! That solves my problem. I'm actually trying to save and load the fit result using a file so that I could refit without the fit process. Now according to your answer I write the following code:
According to the result, training accuracy do increase with budget:
|
I am glad I could help. You can also set |
Hi,
Thank you for providing such wonderful work!
My question may be simple: I use the fit function to get the best model architecture and model parameters, optimizer, etc. But how can I save the result and load it in another file?
For example, now I can see the model's architecture by:
But how can I reuse the structure in another file? Just manually typing? I think there must be some smart way to do this. May 'rifit' can do the job, I just don't know how.
The text was updated successfully, but these errors were encountered: