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

Is there a way to use optimize every n step? #11723

Closed
SimonLitak opened this issue Nov 24, 2018 · 2 comments
Closed

Is there a way to use optimize every n step? #11723

SimonLitak opened this issue Nov 24, 2018 · 2 comments
Labels
type:feature The user is asking for a new feature.

Comments

@SimonLitak
Copy link

For example in pytorch one can store and aggregate losses in a variable which would allow to optimize after n seen batches.
A feature to Model's fit methods fit() and fit_generator() through a param "steps_to_optimize" like:

model.fit(x, y, batch_size=256, steps_to_optimize=4) => batchsize = 1024

so the Optimizer would store the losses for n seen batches, to optimize after n seen batches.

It would give the oppurtunity to optimize problems which need a big batch_size without being restricted to the memory of the device.
Of course for the fit() method there are problems like the overall number of steps has to be a multible of "steps_to_optimize" but at least in fit_generator() it should be doable.

@gabrieldemarmiesse gabrieldemarmiesse added the type:feature The user is asking for a new feature. label Nov 24, 2018
@lvapeab
Copy link
Contributor

lvapeab commented Nov 27, 2018

Hi,

this conversation may be useful to you: #3556.

@SimonLitak
Copy link
Author

Hey,
thanks so much, this is actually exactly what i was looking for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature The user is asking for a new feature.
Projects
None yet
Development

No branches or pull requests

4 participants