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

Dynamic Batch Sizes #183

Closed
twerkmeister opened this issue Apr 29, 2019 · 3 comments
Closed

Dynamic Batch Sizes #183

twerkmeister opened this issue Apr 29, 2019 · 3 comments
Projects

Comments

@twerkmeister
Copy link
Contributor

During some of my trainings I noticed, that the memory consumption differs greatly as the sentence size increases within an epoch. For short sentences in the beginning, TTS only consumed about 3GB, but then later for the long example sentences over 7,4GB. I guess a fixed batch size comes from tasks that deal with fixed size tensors, like in image classification. Given that batch size seems important for learning attention, it might be worth experimenting with dynamic batch sizes. That can probably double the batch size for medium sized sentences.

Any thoughts?

@erogol
Copy link
Contributor

erogol commented Apr 29, 2019

@twerkmeister makes sense. My only concern is the learning rate. If the initial batch size vs the last batch size in an epoch is too different, it might turbulence the training. Anyhow, it is worth to try.

@twerkmeister
Copy link
Contributor Author

Yeah let's keep it in mind as an interesting experiment

@erogol erogol added this to In Progress in v0.0.1 Jul 11, 2019
@erogol erogol moved this from In Progress to TODO in v0.0.1 Sep 11, 2019
@erogol
Copy link
Contributor

erogol commented Nov 12, 2019

It is partially implemented. Not considering the sequence length and active memory usage but I don't see any use for now.

@erogol erogol closed this as completed Nov 12, 2019
v0.0.1 automation moved this from TODO to Done Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
v0.0.1
  
Done
Development

No branches or pull requests

2 participants