change some code style

fix_gru_py
kolinwei 8 years ago
parent 1d69b1ffe3
commit 113548801f

@ -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]))

@ -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)

Loading…
Cancel
Save