Migrate to TensorFlow 0.11.0

This commit is contained in:
Aurélien Geron
2016-11-23 09:26:19 +01:00
parent a40b278df5
commit ccb28831cb
5 changed files with 19 additions and 18 deletions

View File

@@ -1205,7 +1205,7 @@
" return tf.maximum(linear, threshold, name=\"max\")\n",
"\n",
"X = tf.placeholder(tf.float32, shape=(None, n_features), name=\"X\")\n",
"with tf.variable_scope(\"\") as scope:\n",
"with tf.variable_scope(\"\", default_name=\"\") as scope:\n",
" first_relu = relu(X) # create the shared variable\n",
" scope.reuse_variables() # then reuse it\n",
" relus = [first_relu] + [relu(X) for i in range(4)]\n",
@@ -1231,7 +1231,7 @@
"with tf.variable_scope(\"param\", reuse=True):\n",
" y = tf.get_variable(\"x\")\n",
"\n",
"with tf.variable_scope(\"\", reuse=True):\n",
"with tf.variable_scope(\"\", default_name=\"\", reuse=True):\n",
" z = tf.get_variable(\"param/x\", shape=(), initializer=tf.constant_initializer(0.))\n",
"\n",
"print(x is y)\n",
@@ -1688,7 +1688,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.1"
"version": "3.5.2"
},
"nav_menu": {
"height": "603px",