MCPcopy Create free account
hub / github.com/OpenGVLab/UniFormerV2 / get_current_long_cycle_shape

Function get_current_long_cycle_shape

slowfast/utils/multigrid.py:224–240  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

222
223
224def 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]

Callers 1

update_long_cycleMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected