diff options
author | Illia Polosukhin <ipolosukhin@google.com> | 2016-11-03 14:46:06 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2016-11-03 16:09:01 -0700 |
commit | cbd3cacfb73bbea912b9d01c2540187684f751a7 (patch) | |
tree | c2c22af2d05583491b1370dcabdb2e83cb61e2ee /tensorflow/examples/udacity | |
parent | 703fce57eaae725c4ae4b0bd23629c4f04a9de16 (diff) |
Replace usages initialize_all_variables -> global_variables_initializer
Change: 138128703
Diffstat (limited to 'tensorflow/examples/udacity')
-rw-r--r-- | tensorflow/examples/udacity/2_fullyconnected.ipynb | 4 | ||||
-rw-r--r-- | tensorflow/examples/udacity/4_convolutions.ipynb | 2 | ||||
-rw-r--r-- | tensorflow/examples/udacity/5_word2vec.ipynb | 2 | ||||
-rw-r--r-- | tensorflow/examples/udacity/6_lstm.ipynb | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/tensorflow/examples/udacity/2_fullyconnected.ipynb b/tensorflow/examples/udacity/2_fullyconnected.ipynb index 2d1dfa2fba..8a845171a4 100644 --- a/tensorflow/examples/udacity/2_fullyconnected.ipynb +++ b/tensorflow/examples/udacity/2_fullyconnected.ipynb @@ -344,7 +344,7 @@ " # This is a one-time operation which ensures the parameters get initialized as\n", " # we described in the graph: random weights for the matrix, zeros for the\n", " # biases. \n", - " tf.initialize_all_variables().run()\n", + " tf.global_variables_initializer().run()\n", " print('Initialized')\n", " for step in range(num_steps):\n", " # Run the computations. We tell .run() that we want to run the optimizer,\n", @@ -511,7 +511,7 @@ "num_steps = 3001\n", "\n", "with tf.Session(graph=graph) as session:\n", - " tf.initialize_all_variables().run()\n", + " tf.global_variables_initializer().run()\n", " print(\"Initialized\")\n", " for step in range(num_steps):\n", " # Pick an offset within the training data, which has been randomized.\n", diff --git a/tensorflow/examples/udacity/4_convolutions.ipynb b/tensorflow/examples/udacity/4_convolutions.ipynb index ecddcf4369..464d2c836e 100644 --- a/tensorflow/examples/udacity/4_convolutions.ipynb +++ b/tensorflow/examples/udacity/4_convolutions.ipynb @@ -338,7 +338,7 @@ "num_steps = 1001\n", "\n", "with tf.Session(graph=graph) as session:\n", - " tf.initialize_all_variables().run()\n", + " tf.global_variables_initializer().run()\n", " print('Initialized')\n", " for step in range(num_steps):\n", " offset = (step * batch_size) % (train_labels.shape[0] - batch_size)\n", diff --git a/tensorflow/examples/udacity/5_word2vec.ipynb b/tensorflow/examples/udacity/5_word2vec.ipynb index f932f62e28..ec6413a0a3 100644 --- a/tensorflow/examples/udacity/5_word2vec.ipynb +++ b/tensorflow/examples/udacity/5_word2vec.ipynb @@ -509,7 +509,7 @@ "num_steps = 100001\n", "\n", "with tf.Session(graph=graph) as session:\n", - " tf.initialize_all_variables().run()\n", + " tf.global_variables_initializer().run()\n", " print('Initialized')\n", " average_loss = 0\n", " for step in range(num_steps):\n", diff --git a/tensorflow/examples/udacity/6_lstm.ipynb b/tensorflow/examples/udacity/6_lstm.ipynb index 75a7027784..6a9a5be964 100644 --- a/tensorflow/examples/udacity/6_lstm.ipynb +++ b/tensorflow/examples/udacity/6_lstm.ipynb @@ -656,7 +656,7 @@ "summary_frequency = 100\n", "\n", "with tf.Session(graph=graph) as session:\n", - " tf.initialize_all_variables().run()\n", + " tf.global_variables_initializer().run()\n", " print('Initialized')\n", " mean_loss = 0\n", " for step in range(num_steps):\n", |