Deprecated tf.Session removed in toco_from_protos_test.py

This commit is contained in:
Siju Samuel 2019-07-10 14:43:02 +05:30
parent 6de3421b2e
commit 48959a13a1

View File

@ -80,7 +80,7 @@ class TocoFromProtosTest(googletest.TestCase):
def test_toco(self):
"""Run a couple of TensorFlow graphs against TOCO through the python bin."""
with tf.Session() as sess:
with tf.compat.v1.Session() as sess:
img = tf.placeholder(name="img", dtype=tf.float32, shape=(1, 64, 64, 3))
val = img + tf.constant([1., 2., 3.]) + tf.constant([1., 4., 4.])
out = tf.identity(val, name="out")