Skip to content

Commit 410f7ec

Browse files
authored
Update 301_regression.ipynb
1 parent 840ed35 commit 410f7ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tutorial-contents-notebooks/301_regression.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,9 @@
261261
" plt.cla()\n",
262262
" plt.scatter(x.data.numpy(), y.data.numpy())\n",
263263
" plt.plot(x.data.numpy(), prediction.data.numpy(), 'r-', lw=5)\n",
264-
" plt.text(0.5, 0, 'Loss=%.4f' % loss.item(), fontdict={'size': 20, 'color': 'red'})\n",
264+
" plt.text(0.5, 0, 'Loss=%.4f' % loss.data.numpy(), fontdict={'size': 20, 'color': 'red'})\n",
265265
" plt.show()\n",
266-
" plt.pause(0.2)\n",
266+
" plt.pause(0.1)\n",
267267
"\n",
268268
"plt.ioff()\n"
269269
]

0 commit comments

Comments
 (0)