未验证 提交 fb5f7f5e 编写于 作者: L littletomatodonkey 提交者: GitHub

fix loader cause it does not need to break (#2562)

* fix loader cause it does not need to be rebuild for each epoch

* fix loader for dynamic sample

* rm thin import
上级 88c6ad8a
......@@ -21,7 +21,6 @@ import math
import numpy as np
from itertools import groupby
from cv2.ximgproc import thinning as thin
from skimage.morphology._skeletonize import thin
......
......@@ -196,10 +196,8 @@ def train(config,
train_reader_cost = 0.0
batch_sum = 0
batch_start = time.time()
for idx, batch in enumerate(train_dataloader):
for idx, batch in enumerate(train_dataloader()):
train_reader_cost += time.time() - batch_start
if idx >= len(train_dataloader):
break
lr = optimizer.get_lr()
images = batch[0]
if use_srn:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册