Skip to content

How to use schedulers without epochs #2434

Answered by rwightman
fsolgui asked this question in Q&A
Discussion options

You must be logged in to vote

@fsolgui the example train script does it when the --sched-on-updates flag is set, you need to pass the # of steps per epoch to the schedule on creation and call a different step, can see use in the train.py file...

Though the concept of epoch doesn't completely disappear if you use the scheduler factory, it translates epochs -> steps and requires updates_per_epoch to be set... though can use that if you set # epochs = 1 and updates_per_epoch the number of steps you need. If you use the schedulers directy and set t_in_epochs=False that will do a step schedule as well. The scheduler.step_update() is called with current step count after each step instead of calling .step() per epoch

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by fsolgui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants