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
This commit is contained in:
parent
88c6ad8a31
commit
fb5f7f5eb4
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue