ajbrock / BigGAN-PyTorch

The author's officially unofficial PyTorch BigGAN implementation.
MIT License
2.84k stars 470 forks source link

Fix MultiEpochSampler __len__() > 0 error #76

Open JonFreer opened 3 years ago

JonFreer commented 3 years ago

Fix for Issue #71

Caused when len(self.data_source) self.num_epochs < self.start_itr self.batch_size.

This happens once an entire pass of the dataset has occurred and then you resume training.

Fix: sets start_itr to the relative offset, resets to 0 after run through the dataset.

szulm commented 2 years ago

thanks