Make test pass in 2.0

PiperOrigin-RevId: 299856592
Change-Id: I66bc2f47c6d5f337389f9b83758ec0904404be03
This commit is contained in:
Nupur Garg 2020-03-09 09:14:43 -07:00 committed by TensorFlower Gardener
parent b4df0a559a
commit 1d27131082

View File

@ -19,7 +19,7 @@ from __future__ import print_function
import os
import tempfile
import tensorflow as tf
import tensorflow.compat.v1 as tf
from tensorflow.lite.toco import model_flags_pb2
from tensorflow.lite.toco import toco_flags_pb2
from tensorflow.lite.toco import types_pb2
@ -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.compat.v1.Session() as sess:
with tf.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")