Skip to content

Commit

Permalink
修复eta时间计算错误
Browse files Browse the repository at this point in the history
  • Loading branch information
WenmuZhou committed Aug 15, 2024
1 parent d1584fd commit abb9a26
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions torchocr/engine/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,12 @@ def train(self):
total_samples = 0
train_reader_cost = 0.0
train_batch_cost = 0.0
reader_start = time.time()
eta_meter = AverageMeter()

for epoch in range(start_epoch, epoch_num + 1):
if self.train_dataloader.dataset.need_reset:
self.train_dataloader = build_dataloader(self.cfg, 'Train', self.logger)

reader_start = time.time()
for idx, batch in enumerate(self.train_dataloader):
batch = [t.to(self.device) for t in batch]
self.optimizer.zero_grad()
Expand Down

0 comments on commit abb9a26

Please sign in to comment.