mirror of
https://github.com/ArthurDanjou/handson-ml3.git
synced 2026-01-14 20:19:29 +01:00
Replace reduce_sum by reduce_mean for MSE (rather than SSE) error.
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user