From 410f7eca889987e07427127e4d313da6522b189d Mon Sep 17 00:00:00 2001 From: Jerome Date: Thu, 12 Jul 2018 17:14:10 +0800 Subject: [PATCH] Update 301_regression.ipynb --- tutorial-contents-notebooks/301_regression.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorial-contents-notebooks/301_regression.ipynb b/tutorial-contents-notebooks/301_regression.ipynb index 2f7590a..04b9db9 100644 --- a/tutorial-contents-notebooks/301_regression.ipynb +++ b/tutorial-contents-notebooks/301_regression.ipynb @@ -261,9 +261,9 @@ " plt.cla()\n", " plt.scatter(x.data.numpy(), y.data.numpy())\n", " plt.plot(x.data.numpy(), prediction.data.numpy(), 'r-', lw=5)\n", - " plt.text(0.5, 0, 'Loss=%.4f' % loss.item(), fontdict={'size': 20, 'color': 'red'})\n", + " plt.text(0.5, 0, 'Loss=%.4f' % loss.data.numpy(), fontdict={'size': 20, 'color': 'red'})\n", " plt.show()\n", - " plt.pause(0.2)\n", + " plt.pause(0.1)\n", "\n", "plt.ioff()\n" ]