Skip to content

Commit 8370c5a

Browse files
author
yi.wu
committed
fix errors by comment
1 parent 29b32b8 commit 8370c5a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

benchmark/fluid/fluid_benchmark.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ def train(avg_loss, infer_prog, optimizer, train_reader, test_reader, batch_acc,
267267
# pass is not the last, the last batch of this pass
268268
# is also equal to args.batch_size.
269269
if args.use_reader_op:
270-
num_samples += args.batch_size
270+
num_samples += args.batch_size * args.gpus
271271
else:
272272
num_samples += len(data)
273273
train_losses.append(loss)
@@ -363,7 +363,7 @@ def train_parallel(avg_loss, infer_prog, optimizer, train_reader, test_reader,
363363
if args.update_method == "pserver":
364364
exe.bcast_params()
365365
if args.use_reader_op:
366-
num_samples += args.batch_size
366+
num_samples += args.batch_size * args.gpus
367367
else:
368368
num_samples += len(data)
369369
iters += 1

0 commit comments

Comments
 (0)