Skip to content

Commit

Permalink
Update base_trainer.py (#114)
Browse files Browse the repository at this point in the history
progress bar can work with any general iterator. it doesn't need to be a range
  • Loading branch information
avik-pal committed Sep 2, 2019
1 parent a53e8ec commit c1bb476
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions torchgan/trainer/base_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,10 +402,7 @@ def train(self, data_loader, **kwargs):
for model in self.model_names:
getattr(self, model).train()

for progress_bar_iter, data in zip(
progress_bar(range(len(data_loader)), parent=master_bar_iter),
data_loader,
):
for data in progress_bar(data_loader, parent=master_bar_iter):

master_bar_iter.child.comment = f"Epoch {epoch+1} Progress"

Expand Down

0 comments on commit c1bb476

Please sign in to comment.