Skip to content

Commit b557533

Browse files
Refactor linear_regression for TF1.0
Signed-off-by: Norman Heckscher <norman.heckscher@gmail.com>
1 parent 6a26f97 commit b557533

File tree

2 files changed

+42
-32
lines changed

2 files changed

+42
-32
lines changed

examples/2_BasicModels/linear_regression.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
optimizer = tf.train.GradientDescentOptimizer(learning_rate).minimize(cost)
4242

4343
# Initializing the variables
44-
init = tf.initialize_all_variables()
44+
init = tf.global_variables_initializer()
4545

4646
# Launch the graph
4747
with tf.Session() as sess:

0 commit comments

Comments
 (0)