mirror of
https://github.com/ArthurDanjou/handson-ml3.git
synced 2026-02-03 05:27:50 +01:00
Migrate to TensorFlow 0.11.0
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user