提交 8447ec77 编写于 作者: W wuzewu

Fix train log issue

上级 38fc57de
...@@ -192,12 +192,10 @@ def train(cfg): ...@@ -192,12 +192,10 @@ def train(cfg):
def data_generator(): def data_generator():
if args.use_mpio: if args.use_mpio:
print("Use multiprocess reader")
data_gen = dataset.multiprocess_generator( data_gen = dataset.multiprocess_generator(
num_processes=cfg.DATALOADER.NUM_WORKERS, num_processes=cfg.DATALOADER.NUM_WORKERS,
max_queue_size=cfg.DATALOADER.BUF_SIZE) max_queue_size=cfg.DATALOADER.BUF_SIZE)
else: else:
print("Use multi-thread reader")
data_gen = dataset.generator() data_gen = dataset.generator()
batch_data = [] batch_data = []
...@@ -332,6 +330,11 @@ def train(cfg): ...@@ -332,6 +330,11 @@ def train(cfg):
("begin epoch[{}] is larger than cfg.SOLVER.NUM_EPOCHS[{}]").format( ("begin epoch[{}] is larger than cfg.SOLVER.NUM_EPOCHS[{}]").format(
begin_epoch, cfg.SOLVER.NUM_EPOCHS)) begin_epoch, cfg.SOLVER.NUM_EPOCHS))
if args.use_mpio:
print("Use multiprocess reader")
else:
print("Use multi-thread reader")
for epoch in range(begin_epoch, cfg.SOLVER.NUM_EPOCHS + 1): for epoch in range(begin_epoch, cfg.SOLVER.NUM_EPOCHS + 1):
py_reader.start() py_reader.start()
while True: while True:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册