From 8370c5afd0aef8f4a709a9eb6d71f181a03788f6 Mon Sep 17 00:00:00 2001
From: "yi.wu" <yi.wu@baifendian.com>
Date: Wed, 6 Jun 2018 19:10:41 +0800
Subject: [PATCH] fix errors by comment

---
 benchmark/fluid/fluid_benchmark.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/benchmark/fluid/fluid_benchmark.py b/benchmark/fluid/fluid_benchmark.py
index ca7f7dbb071..bd0243aa609 100644
--- a/benchmark/fluid/fluid_benchmark.py
+++ b/benchmark/fluid/fluid_benchmark.py
@@ -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
             # is also equal to args.batch_size.
             if args.use_reader_op:
-                num_samples += args.batch_size
+                num_samples += args.batch_size * args.gpus
             else:
                 num_samples += len(data)
             train_losses.append(loss)
@@ -363,7 +363,7 @@ def train_parallel(avg_loss, infer_prog, optimizer, train_reader, test_reader,
             if args.update_method == "pserver":
                 exe.bcast_params()
             if args.use_reader_op:
-                num_samples += args.batch_size
+                num_samples += args.batch_size * args.gpus
             else:
                 num_samples += len(data)
             iters += 1
-- 
GitLab