Skip to content

Address deprecation warnings. #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/2_BasicModels/linear_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
optimizer = tf.train.GradientDescentOptimizer(learning_rate).minimize(cost)

# Initializing the variables
init = tf.initialize_all_variables()
init = tf.global_variables_initializer()

# Launch the graph
with tf.Session() as sess:
Expand Down
2 changes: 1 addition & 1 deletion examples/2_BasicModels/logistic_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
optimizer = tf.train.GradientDescentOptimizer(learning_rate).minimize(cost)

# Initializing the variables
init = tf.initialize_all_variables()
init = tf.global_variables_initializer()

# Launch the graph
with tf.Session() as sess:
Expand Down
2 changes: 1 addition & 1 deletion examples/2_BasicModels/nearest_neighbor.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
accuracy = 0.

# Initializing the variables
init = tf.initialize_all_variables()
init = tf.global_variables_initializer()

# Launch the graph
with tf.Session() as sess:
Expand Down
2 changes: 1 addition & 1 deletion examples/3_NeuralNetworks/autoencoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def decoder(x):
optimizer = tf.train.RMSPropOptimizer(learning_rate).minimize(cost)

# Initializing the variables
init = tf.initialize_all_variables()
init = tf.global_variables_initializer()

# Launch the graph
with tf.Session() as sess:
Expand Down
2 changes: 1 addition & 1 deletion examples/3_NeuralNetworks/bidirectional_rnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def BiRNN(x, weights, biases):
accuracy = tf.reduce_mean(tf.cast(correct_pred, tf.float32))

# Initializing the variables
init = tf.initialize_all_variables()
init = tf.global_variables_initializer()

# Launch the graph
with tf.Session() as sess:
Expand Down
2 changes: 1 addition & 1 deletion examples/3_NeuralNetworks/convolutional_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def conv_net(x, weights, biases, dropout):
accuracy = tf.reduce_mean(tf.cast(correct_pred, tf.float32))

# Initializing the variables
init = tf.initialize_all_variables()
init = tf.global_variables_initializer()

# Launch the graph
with tf.Session() as sess:
Expand Down
2 changes: 1 addition & 1 deletion examples/3_NeuralNetworks/dynamic_rnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def dynamicRNN(x, seqlen, weights, biases):
accuracy = tf.reduce_mean(tf.cast(correct_pred, tf.float32))

# Initializing the variables
init = tf.initialize_all_variables()
init = tf.global_variables_initializer()

# Launch the graph
with tf.Session() as sess:
Expand Down
2 changes: 1 addition & 1 deletion examples/3_NeuralNetworks/multilayer_perceptron.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def multilayer_perceptron(x, weights, biases):
optimizer = tf.train.AdamOptimizer(learning_rate=learning_rate).minimize(cost)

# Initializing the variables
init = tf.initialize_all_variables()
init = tf.global_variables_initializer()

# Launch the graph
with tf.Session() as sess:
Expand Down
2 changes: 1 addition & 1 deletion examples/3_NeuralNetworks/recurrent_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def RNN(x, weights, biases):
accuracy = tf.reduce_mean(tf.cast(correct_pred, tf.float32))

# Initializing the variables
init = tf.initialize_all_variables()
init = tf.global_variables_initializer()

# Launch the graph
with tf.Session() as sess:
Expand Down
2 changes: 1 addition & 1 deletion examples/4_Utils/save_restore_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def multilayer_perceptron(x, weights, biases):
optimizer = tf.train.AdamOptimizer(learning_rate=learning_rate).minimize(cost)

# Initializing the variables
init = tf.initialize_all_variables()
init = tf.global_variables_initializer()

# 'Saver' op to save and restore all the variables
saver = tf.train.Saver()
Expand Down
2 changes: 1 addition & 1 deletion examples/4_Utils/tensorboard_advanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def multilayer_perceptron(x, weights, biases):
acc = tf.reduce_mean(tf.cast(acc, tf.float32))

# Initializing the variables
init = tf.initialize_all_variables()
init = tf.global_variables_initializer()

# Create a summary to monitor cost tensor
tf.scalar_summary("loss", loss)
Expand Down
2 changes: 1 addition & 1 deletion examples/4_Utils/tensorboard_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
acc = tf.reduce_mean(tf.cast(acc, tf.float32))

# Initializing the variables
init = tf.initialize_all_variables()
init = tf.global_variables_initializer()

# Create a summary to monitor cost tensor
tf.scalar_summary("loss", cost)
Expand Down
2 changes: 1 addition & 1 deletion notebooks/2_BasicModels/linear_regression.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"outputs": [],
"source": [
"# Initializing the variables\n",
"init = tf.initialize_all_variables()"
"init = tf.global_variables_initializer()"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions notebooks/2_BasicModels/logistic_regression.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"optimizer = tf.train.GradientDescentOptimizer(learning_rate).minimize(cost)\n",
"\n",
"# Initializing the variables\n",
"init = tf.initialize_all_variables()"
"init = tf.global_variables_initializer()"
]
},
{
Expand Down Expand Up @@ -169,4 +169,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}
4 changes: 2 additions & 2 deletions notebooks/2_BasicModels/nearest_neighbor.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"accuracy = 0.\n",
"\n",
"# Initializing the variables\n",
"init = tf.initialize_all_variables()"
"init = tf.global_variables_initializer()"
]
},
{
Expand Down Expand Up @@ -328,4 +328,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}
2 changes: 1 addition & 1 deletion notebooks/3_NeuralNetworks/autoencoder.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
"optimizer = tf.train.RMSPropOptimizer(learning_rate).minimize(cost)\n",
"\n",
"# Initializing the variables\n",
"init = tf.initialize_all_variables()"
"init = tf.global_variables_initializer()"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion notebooks/3_NeuralNetworks/bidirectional_rnn.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"accuracy = tf.reduce_mean(tf.cast(correct_pred, tf.float32))\n",
"\n",
"# Initializing the variables\n",
"init = tf.initialize_all_variables()"
"init = tf.global_variables_initializer()"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion notebooks/3_NeuralNetworks/convolutional_network.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
"accuracy = tf.reduce_mean(tf.cast(correct_pred, tf.float32))\n",
"\n",
"# Initializing the variables\n",
"init = tf.initialize_all_variables()"
"init = tf.global_variables_initializer()"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions notebooks/3_NeuralNetworks/multilayer_perceptron.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"optimizer = tf.train.AdamOptimizer(learning_rate=learning_rate).minimize(cost)\n",
"\n",
"# Initializing the variables\n",
"init = tf.initialize_all_variables()"
"init = tf.global_variables_initializer()"
]
},
{
Expand Down Expand Up @@ -204,4 +204,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}
2 changes: 1 addition & 1 deletion notebooks/3_NeuralNetworks/recurrent_network.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"accuracy = tf.reduce_mean(tf.cast(correct_pred, tf.float32))\n",
"\n",
"# Initializing the variables\n",
"init = tf.initialize_all_variables()"
"init = tf.global_variables_initializer()"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions notebooks/4_Utils/save_restore_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
"optimizer = tf.train.AdamOptimizer(learning_rate=learning_rate).minimize(cost)\n",
"\n",
"# Initializing the variables\n",
"init = tf.initialize_all_variables()"
"init = tf.global_variables_initializer()"
]
},
{
Expand Down Expand Up @@ -268,4 +268,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}
2 changes: 1 addition & 1 deletion notebooks/4_Utils/tensorboard_basic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
" acc = tf.reduce_mean(tf.cast(acc, tf.float32))\n",
"\n",
"# Initializing the variables\n",
"init = tf.initialize_all_variables()\n",
"init = tf.global_variables_initializer()\n",
"\n",
"# Create a summary to monitor cost tensor\n",
"tf.scalar_summary(\"loss\", cost)\n",
Expand Down
2 changes: 1 addition & 1 deletion notebooks/5_MultiGPU/multigpu_basics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}