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

Ambiguous whether learningRate should be set on config, or on Updater. #3892

Closed
stolsvik opened this issue Aug 20, 2017 · 2 comments
Closed

Comments

@stolsvik
Copy link

In conjunction with #3891 and #3890, a new problem appears:

If you use the concrete-class variant of specifying Updater (to enable you to set the momentum), you get the method setLearningRate(..). If using the Builder, you get the fluent variant of it as such:

.updater(new Nesterovs.Builder().learningRate(0.001d).momentum(0.98d).build())

However, this won't work, as it is the learningRate set directly on the NeuralNetConfiguration.Builder that is used. This defaults to 1e-1. So evidently the build employs the updater.setLearningRate(..), overwriting whatever the user has set on it.

Maybe a solution could be to not overwrite if the user has explicitly set it, i.e. use the idiom where it is default double.NaN, only overwrite if it still is NaN when building. Or something like that.

Also - as I've understood, the Updater can be layer-specific. This would then need to be handled for this case too - i.e. setting a specific learning rate on an Updater for a specific layer should not be overriden by the base config.

@AlexDBlack AlexDBlack self-assigned this Sep 4, 2017
@AlexDBlack
Copy link
Contributor

Now: only set on updater (no more .learningRate(double) method)
#3985

@lock
Copy link

lock bot commented Sep 24, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Sep 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants