Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3a5fb7c

Browse files
8bitmp3melissawm
authored andcommitted
Fix the print statement (remove sys) to pass the CI tests
1 parent9e025a7 commit3a5fb7c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

‎content/tutorial-deep-learning-on-mnist.ipynb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -950,12 +950,12 @@
950950
" test_accurate_predictions += int(np.argmax(layer_2) == np.argmax(test_labels[i:i+1]))\n",
951951
"\n",
952952
" # 3. Display the error and accuracy metrics in the output.\n",
953-
"sys.stdout.write(\"\\n\" +\\\n",
954-
"\"Epoch:\" + str(j+10) +\\\n",
955-
"\" Training set error:\" + str(training_loss/ float(len(training_images)))[0:5] +\\\n",
956-
"\" Training set accuracy:\" + str(training_accurate_predictions/ float(len(training_images))) +\\\n",
957-
"\" Test set error:\" + str(test_loss/ float(len(test_images)))[0:5] +\\\n",
958-
"\" Test set accuracy:\" + str(test_accurate_predictions/ float(len(test_images))))"
953+
"print(\"\\n\" +\\\n",
954+
"\"Epoch:\" + str(j+10) +\\\n",
955+
"\" Training set error:\" + str(training_loss/ float(len(training_images)))[0:5] +\\\n",
956+
"\" Training set accuracy:\" + str(training_accurate_predictions/ float(len(training_images))) +\\\n",
957+
"\" Test set error:\" + str(test_loss/ float(len(test_images)))[0:5] +\\\n",
958+
"\" Test set accuracy:\" + str(test_accurate_predictions/ float(len(test_images))))\n"
959959
]
960960
},
961961
{
@@ -1014,4 +1014,4 @@
10141014
},
10151015
"nbformat":4,
10161016
"nbformat_minor":0
1017-
}
1017+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp