tf.contrib.layers.variance_scaling_initializer moved to tf.variance_scaling_initializer
parent
38c2ea79e4
commit
e05d4b36ac
|
@ -574,15 +574,6 @@
|
||||||
" plt.show()"
|
" plt.show()"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"cell_type": "code",
|
|
||||||
"execution_count": null,
|
|
||||||
"metadata": {},
|
|
||||||
"outputs": [],
|
|
||||||
"source": [
|
|
||||||
"openai_cart_pole_rendering = False # don't try, just use the safe way?"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 26,
|
"execution_count": 26,
|
||||||
|
@ -783,7 +774,7 @@
|
||||||
"n_inputs = 4 # == env.observation_space.shape[0]\n",
|
"n_inputs = 4 # == env.observation_space.shape[0]\n",
|
||||||
"n_hidden = 4 # it's a simple task, we don't need more than this\n",
|
"n_hidden = 4 # it's a simple task, we don't need more than this\n",
|
||||||
"n_outputs = 1 # only outputs the probability of accelerating left\n",
|
"n_outputs = 1 # only outputs the probability of accelerating left\n",
|
||||||
"initializer = tf.contrib.layers.variance_scaling_initializer()\n",
|
"initializer = tf.variance_scaling_initializer()\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# 2. Build the neural network\n",
|
"# 2. Build the neural network\n",
|
||||||
"X = tf.placeholder(tf.float32, shape=[None, n_inputs])\n",
|
"X = tf.placeholder(tf.float32, shape=[None, n_inputs])\n",
|
||||||
|
@ -883,7 +874,7 @@
|
||||||
"\n",
|
"\n",
|
||||||
"learning_rate = 0.01\n",
|
"learning_rate = 0.01\n",
|
||||||
"\n",
|
"\n",
|
||||||
"initializer = tf.contrib.layers.variance_scaling_initializer()\n",
|
"initializer = tf.variance_scaling_initializer()\n",
|
||||||
"\n",
|
"\n",
|
||||||
"X = tf.placeholder(tf.float32, shape=[None, n_inputs])\n",
|
"X = tf.placeholder(tf.float32, shape=[None, n_inputs])\n",
|
||||||
"y = tf.placeholder(tf.float32, shape=[None, n_outputs])\n",
|
"y = tf.placeholder(tf.float32, shape=[None, n_outputs])\n",
|
||||||
|
@ -1008,7 +999,7 @@
|
||||||
"\n",
|
"\n",
|
||||||
"learning_rate = 0.01\n",
|
"learning_rate = 0.01\n",
|
||||||
"\n",
|
"\n",
|
||||||
"initializer = tf.contrib.layers.variance_scaling_initializer()\n",
|
"initializer = tf.variance_scaling_initializer()\n",
|
||||||
"\n",
|
"\n",
|
||||||
"X = tf.placeholder(tf.float32, shape=[None, n_inputs])\n",
|
"X = tf.placeholder(tf.float32, shape=[None, n_inputs])\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
@ -1481,7 +1472,7 @@
|
||||||
"n_hidden = 512\n",
|
"n_hidden = 512\n",
|
||||||
"hidden_activation = tf.nn.relu\n",
|
"hidden_activation = tf.nn.relu\n",
|
||||||
"n_outputs = env.action_space.n # 9 discrete actions are available\n",
|
"n_outputs = env.action_space.n # 9 discrete actions are available\n",
|
||||||
"initializer = tf.contrib.layers.variance_scaling_initializer()\n",
|
"initializer = tf.variance_scaling_initializer()\n",
|
||||||
"\n",
|
"\n",
|
||||||
"def q_network(X_state, name):\n",
|
"def q_network(X_state, name):\n",
|
||||||
" prev_layer = X_state / 128.0 # scale pixel intensities to the [-1.0, 1.0] range.\n",
|
" prev_layer = X_state / 128.0 # scale pixel intensities to the [-1.0, 1.0] range.\n",
|
||||||
|
@ -1924,7 +1915,7 @@
|
||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.6.3"
|
"version": "3.5.2"
|
||||||
},
|
},
|
||||||
"nav_menu": {},
|
"nav_menu": {},
|
||||||
"toc": {
|
"toc": {
|
||||||
|
|
Loading…
Reference in New Issue