Fix my_reber_classifier path (fixes #267)

main
Aurélien Geron 2018-07-30 18:58:02 +01:00
parent a28604d023
commit 060751a976
1 changed files with 2 additions and 2 deletions

View File

@ -2411,7 +2411,7 @@
" acc_val = accuracy.eval(feed_dict={X: X_val, seq_length: l_val, y: y_val})\n", " acc_val = accuracy.eval(feed_dict={X: X_val, seq_length: l_val, y: y_val})\n",
" print(\"{:4d} Train loss: {:.4f}, accuracy: {:.2f}% Validation accuracy: {:.2f}%\".format(\n", " print(\"{:4d} Train loss: {:.4f}, accuracy: {:.2f}% Validation accuracy: {:.2f}%\".format(\n",
" epoch, loss_val, 100 * acc_train, 100 * acc_val))\n", " epoch, loss_val, 100 * acc_train, 100 * acc_val))\n",
" saver.save(sess, \"my_reber_classifier\")" " saver.save(sess, \"./my_reber_classifier\")"
] ]
}, },
{ {
@ -2436,7 +2436,7 @@
" for s in test_strings]\n", " for s in test_strings]\n",
"\n", "\n",
"with tf.Session() as sess:\n", "with tf.Session() as sess:\n",
" saver.restore(sess, \"my_reber_classifier\")\n", " saver.restore(sess, \"./my_reber_classifier\")\n",
" y_proba_val = y_proba.eval(feed_dict={X: X_test, seq_length: l_test})\n", " y_proba_val = y_proba.eval(feed_dict={X: X_test, seq_length: l_test})\n",
"\n", "\n",
"print()\n", "print()\n",