未验证 提交 f4138cf9 编写于 作者: 0 0x45f 提交者: GitHub

[Dy2Stat]Fix test_mnist_pure_fp16 (#37791)

* fix test_mnist_pure_fp16

* change batch_id
上级 c1fd1b1c
......@@ -91,13 +91,13 @@ class TestPureFP16(TestMNIST):
loss_data.append(avg_loss.numpy()[0])
# save checkpoint
mnist.clear_gradients()
if batch_id % 10 == 0:
if batch_id % 2 == 0:
print(
"Loss at epoch {} step {}: loss: {:}, acc: {}, cost: {}"
.format(epoch, batch_id,
avg_loss.numpy(), acc.numpy(), time() - start))
start = time()
if batch_id == 50:
if batch_id == 10:
break
return loss_data
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册