Skip to content
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

[FEATURE] Model save in RBM #878

Closed
ghost opened this issue Jul 26, 2019 · 5 comments
Closed

[FEATURE] Model save in RBM #878

ghost opened this issue Jul 26, 2019 · 5 comments
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Jul 26, 2019

Description

Add feature to allow the RBM model to save itself to disk.

Expected behavior with the suggested feature

RBM encapsulates the tensorflow details within its implementation. It would be nice to have the code to save the trained model to disk so that tensorflow.utils and other modules do not have to be imported into the scripts that create the RBM instance.

something like:

rbm_model = RBM(.....)
train_time = rbm_model.fit(...)
rbm_model.save(DIR, overwrite=True)

Other Comments

@ghost ghost added the enhancement New feature or request label Jul 26, 2019
@ghost
Copy link
Author

ghost commented Aug 5, 2019

Bumping my original post - is there any way to save the RBM model similar to the implementation of Wide Deep? If someone could provide some tips on how to get started, it would be much appreciated.

@ghost
Copy link
Author

ghost commented Aug 5, 2019

@WessZumino - I've implemented Azure HyperDrive hyperparameter optimization for RBM using the Surprise and Wide Deep hyperdrive notebook examples. I'm looking for tips on how to save the best model so that I can use it later for scoring. Any guidance would be much appreciated

@mtayyab-numtra
Copy link

Did you find any way to export the RBM model?

@WessZumino
Copy link
Contributor

Hi @mtayyab-numtra, I am not actively working on this anymore. Weights can be saved and loaded as per any other tensorflow model, if this is what you are asking. If you mean saving weights when using AML or AML's Hyperdrive, the issue is the same. You need to create a script following examples from the Wide & Deep model, and add the save weight method. Once hyperdrive is done, you will see the plot of the metric(s) you chose and you can select the one with the best performance. For each model, AML will save the weights in a directory of your choice. Than you need to retrieve the weights for the model you selected (again following the example for Wide & Deep) and load them in the RBM model. I believe you need to add a method for this, but this is also standard. Let me know if this helps.

@miguelgfierro
Copy link
Collaborator

fixed in #1618

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants