diff --git a/tutorial-contents-notebooks/401_CNN.ipynb b/tutorial-contents-notebooks/401_CNN.ipynb index 5f5dfb2..e875c4f 100644 --- a/tutorial-contents-notebooks/401_CNN.ipynb +++ b/tutorial-contents-notebooks/401_CNN.ipynb @@ -470,7 +470,7 @@ " test_output, last_layer = cnn(test_x)\n", " pred_y = torch.max(test_output, 1)[1].data.squeeze()\n", " accuracy = (pred_y == test_y).sum().item() / float(test_y.size(0))\n", - " print('Epoch: ', epoch, '| train loss: %.4f' % loss.data[0], '| test accuracy: %.2f' % accuracy)\n", + " print('Epoch: ', epoch, '| train loss: %.4f' % loss.data.item(), '| test accuracy: %.2f' % accuracy)\n", " if HAS_SK:\n", " # Visualization of trained flatten layer (T-SNE)\n", " tsne = TSNE(perplexity=30, n_components=2, init='pca', n_iter=5000)\n", @@ -506,9 +506,9 @@ ], "metadata": { "kernelspec": { - "display_name": "tensor", + "display_name": "Python 3", "language": "python", - "name": "tensor" + "name": "python3" }, "language_info": { "codemirror_mode": { @@ -520,7 +520,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.4" + "version": "3.6.4" } }, "nbformat": 4,