Given a schedule and epoch index, return the long cycle base shape. Args: schedule (configs): configs that contains training and multigrid specific hyperparameters. Details can be seen in slowfast/config/defaults.py. cur_epoch (int): current epoch ind
(schedule, epoch)
| 222 | |
| 223 | |
| 224 | def get_current_long_cycle_shape(schedule, epoch): |
| 225 | """ |
| 226 | Given a schedule and epoch index, return the long cycle base shape. |
| 227 | Args: |
| 228 | schedule (configs): configs that contains training and multigrid specific |
| 229 | hyperparameters. Details can be seen in |
| 230 | slowfast/config/defaults.py. |
| 231 | cur_epoch (int): current epoch index. |
| 232 | Returns: |
| 233 | shapes (list): A list describing the base shape in a long cycle: |
| 234 | [batch size relative to default, |
| 235 | number of frames, spatial dimension]. |
| 236 | """ |
| 237 | for s in schedule: |
| 238 | if epoch < s[-1]: |
| 239 | return s[1] |
| 240 | return schedule[-1][1] |