Skip to content

Commit

Permalink
use learning rate as func parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
rasbt committed Jun 30, 2018
1 parent 7808f9f commit 9c9e714
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions code/ch15/ch15.ipynb
Expand Up @@ -864,7 +864,7 @@
},
"outputs": [],
"source": [
"def build_cnn():\n",
"def build_cnn(learning_rate=1e-4):\n",
" ## Placeholders for X and y:\n",
" tf_x = tf.placeholder(tf.float32, shape=[None, 784],\n",
" name='tf_x')\n",
Expand Down Expand Up @@ -1056,8 +1056,7 @@
"import tensorflow as tf\n",
"import numpy as np\n",
"\n",
"## Define hyperparameters\n",
"learning_rate = 1e-4\n",
"## Define random seed\n",
"random_seed = 123\n",
"\n",
"np.random.seed(random_seed)\n",
Expand Down

0 comments on commit 9c9e714

Please sign in to comment.