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

Something wrong when calculate t_total #10

Open
InhyeokYoo opened this issue Feb 24, 2022 · 1 comment
Open

Something wrong when calculate t_total #10

InhyeokYoo opened this issue Feb 24, 2022 · 1 comment

Comments

@InhyeokYoo
Copy link

InhyeokYoo commented Feb 24, 2022

First of all, I really appreciate for the nice repo.

The t_total in run.py is calculated by t_total = len(train_dataloader) // args.gradient_accumulation_steps * args.num_train_epochs and the t_total is passed into transformers.get_linear_schedule_with_warmup. This indicates the total number of steps of the training process.

However, I guess the total nember of steps is calculated by the number of batches * epoch. Therefore, the code for calculating t_total should be t_total = len(train_dataloader) // (args.train_batch_size * args.gradient_accumulation_steps) * args.num_train_epochs

If I'm wrong, please let me know what am I missing.

@hieudx149
Copy link

hieudx149 commented May 16, 2022

Hi @InhyeokYoo, i think in train_dataloader it's already do len(train_examples) // batch_size when call train_dataloader = Dataloader(batch_size=.....)

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

No branches or pull requests

2 participants