Replace the usages of array_ops.pack with its TF public api.

PiperOrigin-RevId: 341496338
Change-Id: If79be29825fbb67d53be04a37505661df108ac62
This commit is contained in:
Yanhui Liang 2020-11-09 15:20:48 -08:00 committed by TensorFlower Gardener
parent 51dc6eca9c
commit b7687e53d1

View File

@ -34,6 +34,7 @@ from tensorflow.python.keras.layers import core
from tensorflow.python.keras.layers import normalization from tensorflow.python.keras.layers import normalization
from tensorflow.python.module import module from tensorflow.python.module import module
from tensorflow.python.ops import array_ops from tensorflow.python.ops import array_ops
from tensorflow.python.ops import gen_array_ops
from tensorflow.python.ops import math_ops from tensorflow.python.ops import math_ops
from tensorflow.python.ops import variables from tensorflow.python.ops import variables
from tensorflow.python.platform import test from tensorflow.python.platform import test
@ -226,7 +227,7 @@ class ListTests(keras_parameterized.TestCase):
self.assertAllEqual( self.assertAllEqual(
[1., 2., 3.], [1., 2., 3.],
self.evaluate(array_ops.pack(ListToTensor().l))) self.evaluate(gen_array_ops.Pack(values=ListToTensor().l)))
class ListWrapperTest(test.TestCase): class ListWrapperTest(test.TestCase):
@ -540,7 +541,7 @@ class TupleTests(keras_parameterized.TestCase):
self.assertAllEqual( self.assertAllEqual(
(1., 2., 3.), (1., 2., 3.),
self.evaluate(array_ops.pack(TupleToTensor().l))) self.evaluate(gen_array_ops.Pack(values=TupleToTensor().l)))
class InterfaceTests(keras_parameterized.TestCase): class InterfaceTests(keras_parameterized.TestCase):