Migrate to TensorFlow 0.11.0

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

1
.gitignore vendored
View File

@ -8,3 +8,4 @@ logs/*
tf_logs/* tf_logs/*
images/**/*.png images/**/*.png
my_* my_*
datasets/words

View File

@ -1205,7 +1205,7 @@
" return tf.maximum(linear, threshold, name=\"max\")\n", " return tf.maximum(linear, threshold, name=\"max\")\n",
"\n", "\n",
"X = tf.placeholder(tf.float32, shape=(None, n_features), name=\"X\")\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", " first_relu = relu(X) # create the shared variable\n",
" scope.reuse_variables() # then reuse it\n", " scope.reuse_variables() # then reuse it\n",
" relus = [first_relu] + [relu(X) for i in range(4)]\n", " relus = [first_relu] + [relu(X) for i in range(4)]\n",
@ -1231,7 +1231,7 @@
"with tf.variable_scope(\"param\", reuse=True):\n", "with tf.variable_scope(\"param\", reuse=True):\n",
" y = tf.get_variable(\"x\")\n", " y = tf.get_variable(\"x\")\n",
"\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", " z = tf.get_variable(\"param/x\", shape=(), initializer=tf.constant_initializer(0.))\n",
"\n", "\n",
"print(x is y)\n", "print(x is y)\n",
@ -1688,7 +1688,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": "603px", "height": "603px",

View File

@ -511,7 +511,7 @@
}, },
"outputs": [], "outputs": [],
"source": [ "source": [
"with tf.variable_scope(\"\", reuse=True):\n", "with tf.variable_scope(\"\", default_name=\"\", reuse=True): # root scope\n",
" weights1 = tf.get_variable(\"hidden1/weights\")\n", " weights1 = tf.get_variable(\"hidden1/weights\")\n",
" weights2 = tf.get_variable(\"hidden2/weights\")\n", " weights2 = tf.get_variable(\"hidden2/weights\")\n",
" " " "
@ -820,7 +820,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 36,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -832,7 +832,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 37,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -910,7 +910,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": "360px", "height": "360px",

View File

@ -592,7 +592,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": {},
"toc": { "toc": {

View File

@ -31,32 +31,32 @@ https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tarball/master
# See https://www.tensorflow.org/versions/master/get_started/os_setup.html # See https://www.tensorflow.org/versions/master/get_started/os_setup.html
# Ubuntu/Linux 64-bit, CPU only, Python 2.7 # Ubuntu/Linux 64-bit, CPU only, Python 2.7
#https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.10.0-cp27-none-linux_x86_64.whl #https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0-cp27-none-linux_x86_64.whl
# Ubuntu/Linux 64-bit, GPU enabled, Python 2.7 # Ubuntu/Linux 64-bit, GPU enabled, Python 2.7
#https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.10.0-cp27-none-linux_x86_64.whl #https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.11.0-cp27-none-linux_x86_64.whl
# Mac OS X, CPU only, Python 2.7: # Mac OS X, CPU only, Python 2.7:
#https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.10.0-py2-none-any.whl #https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.11.0-py2-none-any.whl
# Mac OS X, GPU enabled, Python 2.7: # Mac OS X, GPU enabled, Python 2.7:
#https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow-0.10.0-py2-none-any.whl #https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow-0.11.0-py2-none-any.whl
# Ubuntu/Linux 64-bit, CPU only, Python 3.4 # Ubuntu/Linux 64-bit, CPU only, Python 3.4
#https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.10.0-cp34-cp34m-linux_x86_64.whl #https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0-cp34-cp34m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, GPU enabled, Python 3.4 # Ubuntu/Linux 64-bit, GPU enabled, Python 3.4
#https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.10.0-cp34-cp34m-linux_x86_64.whl #https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.11.0-cp34-cp34m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, CPU only, Python 3.5 # Ubuntu/Linux 64-bit, CPU only, Python 3.5
https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.10.0-cp35-cp35m-linux_x86_64.whl https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0-cp35-cp35m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, GPU enabled, Python 3.5 # Ubuntu/Linux 64-bit, GPU enabled, Python 3.5
#https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.10.0-cp35-cp35m-linux_x86_64.whl #https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.11.0-cp35-cp35m-linux_x86_64.whl
# Mac OS X, CPU only, Python 3.4 or 3.5: # Mac OS X, CPU only, Python 3.4 or 3.5:
#https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.10.0-py3-none-any.whl #https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.11.0-py3-none-any.whl
# Mac OS X, GPU enabled, Python 3.4 or 3.5: # Mac OS X, GPU enabled, Python 3.4 or 3.5:
#https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow-0.10.0-py3-none-any.whl #https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow-0.11.0-py3-none-any.whl