diff --git a/benchmark/fluid/mnist.py b/benchmark/fluid/mnist.py index 1cb4314fb22ae935a00ceea25128e7f2b5430c84..8d51d4aa60dbfc201121a44cfd99cb9d5baa95ec 100644 --- a/benchmark/fluid/mnist.py +++ b/benchmark/fluid/mnist.py @@ -184,8 +184,8 @@ def run_benchmark(model, args): ] ) # The accuracy is the accumulation of batches, but not the current batch. accuracy.update( - value=np.array(np.mean(outs[1])), - weight=np.mean(np.array(outs[2]))) + value=np.array(np.mean(outs[1])), + weight=np.mean(np.array(outs[2]))) iters += 1 num_samples += len(y_data) loss = np.mean(np.array(outs[0])) diff --git a/benchmark/fluid/vgg.py b/benchmark/fluid/vgg.py index 261446e7e94ae38e723e629c58c7e1e1386cb0a6..2a9566a45c3804183e05db9298cec4f670225a6f 100644 --- a/benchmark/fluid/vgg.py +++ b/benchmark/fluid/vgg.py @@ -188,7 +188,9 @@ def main(): loss, acc, weight = train_exe.run( feed={"pixel": img_data, "label": y_data}, - fetch_list=[avg_cost.name, batch_acc.name, batch_size_tensor.name]) + fetch_list=[ + avg_cost.name, batch_acc.name, batch_size_tensor.name + ]) accuracy.add(value=np.array(np.mean(acc)), weight=np.mean(weight)) iters += 1 num_samples += len(y_data)