Skip to content

Commit 1135488

Browse files
committed
change some code style
1 parent 1d69b1f commit 1135488

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

benchmark/fluid/mnist.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ def run_benchmark(model, args):
184184
]
185185
) # The accuracy is the accumulation of batches, but not the current batch.
186186
accuracy.update(
187-
value=np.array(np.mean(outs[1])),
188-
weight=np.mean(np.array(outs[2])))
187+
value=np.array(np.mean(outs[1])),
188+
weight=np.mean(np.array(outs[2])))
189189
iters += 1
190190
num_samples += len(y_data)
191191
loss = np.mean(np.array(outs[0]))

benchmark/fluid/vgg.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,9 @@ def test(exe):
188188
loss, acc, weight = train_exe.run(
189189
feed={"pixel": img_data,
190190
"label": y_data},
191-
fetch_list=[avg_cost.name, batch_acc.name, batch_size_tensor.name])
191+
fetch_list=[
192+
avg_cost.name, batch_acc.name, batch_size_tensor.name
193+
])
192194
accuracy.add(value=np.array(np.mean(acc)), weight=np.mean(weight))
193195
iters += 1
194196
num_samples += len(y_data)

0 commit comments

Comments
 (0)