MCPcopy Create free account
hub / github.com/MotrixLab/ViMoGen / sample_data

Function sample_data

train_eval_vimogen.py:41–48  ·  view source on GitHub ↗
(loader, sampler, start_epoch, start_iter)

Source from the content-addressed store, hash-verified

39
40
41def sample_data(loader, sampler, start_epoch, start_iter):
42 epoch = start_epoch
43 while True:
44 sampler.set_epoch(epoch)
45 begin_iter = start_iter if epoch == start_epoch else 0
46 epoch += 1
47 for _, batch in enumerate(loader, start=begin_iter):
48 yield batch
49
50
51def main(args):

Callers 1

mainFunction · 0.85

Calls 1

set_epochMethod · 0.80

Tested by

no test coverage detected