-
Notifications
You must be signed in to change notification settings - Fork 282
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
Transferring Python optimizer 'AdaMod' to Keras in R #1220
Comments
Hi, Thanks for filing. a) The link you provide to AdaMod is for a pytorch implementation. When you run b) In one of the issues you cross-posted, someone helpfully pointed you to a tensorflow implementation. c) Unfortunately, the tensorflow implementation is not "packaged" up such that it will install nicely using pip or conda. It's a standalone python script that implements the optimizer. If you are interested in trying out the tensorflow implementation of the AdaMod optimizer, implemented by githhub user evanatyourservice, instead of installing it through pip or conda, you can clone it and then import it like this.
Then in the R session, you can import it like so: AdaMod <- reticulate::import_from_path("AdaMod", "/path/to/where/you/cloned/AdaMod-tf")$AdaMod |
Tnx a lot. That sounds great. Sorry, I've never before worked with GitHub repositories. However, when I push the "Code"-button right above When I did this, the command
was perfectly accepted in the R session, but compiling the (existing) model with
produced the error message
So, apparently, that's not the right way to proceed... |
reticulate::import_from_path("AdaMod", "D:/R/WP_keras/AdaMod/") |
Thanks again for your continued interest in my problem. I am sorry to say, however, the suggestion from above didn't solve it. The command
was again accepted smoothly, but executing the compile command
although AdaMod has correctly identified the .py-module and somehow Keras had an inkling of the expected status of Among the many other attempts to get AdaMod going I tried a command similar to your very first proposal, namely
This command was, again, accepted and according to the RStudio environment pane produced a but trying to compile the existing Keras model as above led to the following error message.
I'm really at a loss how to proceed... |
In An Adaptive and Momental Bound Method for Stochastic Learning, a new optimizer
AdaMod
is being reported which is able to smooth out unexpected large learning rates throughout the training process. For details regarding its use in Python environments see https://github.com/lancopku/AdaMod. A recommended setting under these conditions isSince I am working in RStudio with Keras in R, I tried to transfer
AdaMod
to my workingreticulate/conda
environment by following steps:which produced
from which I gained some confidence to try
AdaMod
in one of my deep learning programs, configuring my model as I am used to do in case of Keras standard optimizers by specifyingHowever, the disappointing result was
The question obviously is, how could I proceed to get Keras in R to find and successfully apply this function?
Note: This problem was raised about a year ago in
but, unfortunately, is still pending unresolved. Any help would be highly appreciated.
The text was updated successfully, but these errors were encountered: