提交 8370c5af 编写于 作者: Y yi.wu

fix errors by comment

上级 29b32b80
...@@ -267,7 +267,7 @@ def train(avg_loss, infer_prog, optimizer, train_reader, test_reader, batch_acc, ...@@ -267,7 +267,7 @@ def train(avg_loss, infer_prog, optimizer, train_reader, test_reader, batch_acc,
# pass is not the last, the last batch of this pass # pass is not the last, the last batch of this pass
# is also equal to args.batch_size. # is also equal to args.batch_size.
if args.use_reader_op: if args.use_reader_op:
num_samples += args.batch_size num_samples += args.batch_size * args.gpus
else: else:
num_samples += len(data) num_samples += len(data)
train_losses.append(loss) train_losses.append(loss)
...@@ -363,7 +363,7 @@ def train_parallel(avg_loss, infer_prog, optimizer, train_reader, test_reader, ...@@ -363,7 +363,7 @@ def train_parallel(avg_loss, infer_prog, optimizer, train_reader, test_reader,
if args.update_method == "pserver": if args.update_method == "pserver":
exe.bcast_params() exe.bcast_params()
if args.use_reader_op: if args.use_reader_op:
num_samples += args.batch_size num_samples += args.batch_size * args.gpus
else: else:
num_samples += len(data) num_samples += len(data)
iters += 1 iters += 1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册