Skip to content
Snippets Groups Projects
Commit 29d2f18a authored by Zachary Garrett's avatar Zachary Garrett
Browse files

Use compat.v1 API to be TF 2.0 compatible

PiperOrigin-RevId: 272519083
parent 97dd1496
No related branches found
No related tags found
No related merge requests found
......@@ -182,7 +182,7 @@ def get_mnist_training_example():
weights=tf.Variable(initial_value=state.model.weights, name='weights'),
bias=tf.Variable(initial_value=state.model.bias, name='bias'))
with tf.control_dependencies([tf.global_variables_initializer()]):
with tf.control_dependencies([tf.compat.v1.global_variables_initializer()]):
init_model = tf.group(
tf.assign(model_vars.weights, state.model.weights),
tf.assign(model_vars.bias, state.model.bias))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment