提交 5f2eaa7c 编写于 作者: Y Yang Nie 提交者: Tingquan Gao

bugfix: set_epoch after reume

上级 ee40e1fc
...@@ -369,6 +369,9 @@ class Engine(object): ...@@ -369,6 +369,9 @@ class Engine(object):
ema_module) ema_module)
if metric_info is not None: if metric_info is not None:
best_metric.update(metric_info) best_metric.update(metric_info)
if hasattr(self.train_dataloader.batch_sampler, "set_epoch"):
self.train_dataloader.batch_sampler.set_epoch(best_metric[
"epoch"])
for epoch_id in range(best_metric["epoch"] + 1, for epoch_id in range(best_metric["epoch"] + 1,
self.config["Global"]["epochs"] + 1): self.config["Global"]["epochs"] + 1):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册