Skip to content

Commit 7227cfe

Browse files
Merge pull request aymericdamien#82 from DVigneault/InitializationDeprecationWarning
Address deprecation warnings.
2 parents 5eeee53 + b1b47a1 commit 7227cfe

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

examples/3_NeuralNetworks/dynamic_rnn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def dynamicRNN(x, seqlen, weights, biases):
162162
accuracy = tf.reduce_mean(tf.cast(correct_pred, tf.float32))
163163

164164
# Initializing the variables
165-
init = tf.initialize_all_variables()
165+
init = tf.global_variables_initializer()
166166

167167
# Launch the graph
168168
with tf.Session() as sess:

examples/4_Utils/tensorboard_advanced.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def multilayer_perceptron(x, weights, biases):
8888
acc = tf.reduce_mean(tf.cast(acc, tf.float32))
8989

9090
# Initializing the variables
91-
init = tf.initialize_all_variables()
91+
init = tf.global_variables_initializer()
9292

9393
# Create a summary to monitor cost tensor
9494
tf.summary.scalar("loss", loss)

examples/4_Utils/tensorboard_basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
acc = tf.reduce_mean(tf.cast(acc, tf.float32))
5050

5151
# Initializing the variables
52-
init = tf.initialize_all_variables()
52+
init = tf.global_variables_initializer()
5353

5454
# Create a summary to monitor cost tensor
5555
tf.summary.scalar("loss", cost)

notebooks/5_MultiGPU/multigpu_basics.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,4 +175,4 @@
175175
},
176176
"nbformat": 4,
177177
"nbformat_minor": 0
178-
}
178+
}

0 commit comments

Comments
 (0)