Replace reduce_sum by reduce_mean for MSE (rather than SSE) error.
parent
30ca2b86d7
commit
ba100cde2a
|
@ -208,7 +208,7 @@
|
||||||
"hidden = fully_connected(X, n_hidden, activation_fn=None)\n",
|
"hidden = fully_connected(X, n_hidden, activation_fn=None)\n",
|
||||||
"outputs = fully_connected(hidden, n_outputs, activation_fn=None)\n",
|
"outputs = fully_connected(hidden, n_outputs, activation_fn=None)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"mse = tf.reduce_sum(tf.square(outputs - X))\n",
|
"mse = tf.reduce_mean(tf.square(outputs - X))\n",
|
||||||
"\n",
|
"\n",
|
||||||
"optimizer = tf.train.AdamOptimizer(learning_rate)\n",
|
"optimizer = tf.train.AdamOptimizer(learning_rate)\n",
|
||||||
"training_op = optimizer.minimize(mse)\n",
|
"training_op = optimizer.minimize(mse)\n",
|
||||||
|
@ -1568,7 +1568,7 @@
|
||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.5.1"
|
"version": "3.5.2+"
|
||||||
},
|
},
|
||||||
"nav_menu": {
|
"nav_menu": {
|
||||||
"height": "381px",
|
"height": "381px",
|
||||||
|
|
Loading…
Reference in New Issue