Replace reduce_sum by reduce_mean for MSE (rather than SSE) error.

main
Aurélien Geron 2017-02-02 18:51:54 +01:00
parent 30ca2b86d7
commit ba100cde2a
1 changed files with 2 additions and 2 deletions

View File

@ -208,7 +208,7 @@
"hidden = fully_connected(X, n_hidden, activation_fn=None)\n",
"outputs = fully_connected(hidden, n_outputs, activation_fn=None)\n",
"\n",
"mse = tf.reduce_sum(tf.square(outputs - X))\n",
"mse = tf.reduce_mean(tf.square(outputs - X))\n",
"\n",
"optimizer = tf.train.AdamOptimizer(learning_rate)\n",
"training_op = optimizer.minimize(mse)\n",
@ -1568,7 +1568,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.1"
"version": "3.5.2+"
},
"nav_menu": {
"height": "381px",