Fix more build dependency and tests in keras for sync to OSS.

PiperOrigin-RevId: 336947422
Change-Id: Ib6c829551b45050ace5a94aa4450a8f36fea46e6
This commit is contained in:
Scott Zhu 2020-10-13 13:47:20 -07:00 committed by TensorFlower Gardener
parent 7b2f9fe0a2
commit 0f53c3fd79
4 changed files with 10 additions and 4 deletions

View File

@ -731,7 +731,7 @@ tf_py_test(
tf_py_test(
name = "deferred_sequential_test",
size = "small",
size = "medium",
srcs = ["deferred_sequential_test.py"],
python_version = "PY3",
tags = [

View File

@ -476,7 +476,9 @@ distribute_py_test(
srcs = ["discretization_distribution_test.py"],
main = "discretization_distribution_test.py",
python_version = "PY3",
tags = ["multi_and_single_gpu"],
tags = [
"multi_and_single_gpu",
],
deps = [
":discretization",
":preprocessing_test_utils",
@ -618,7 +620,9 @@ distribute_py_test(
srcs = ["normalization_distribution_test.py"],
main = "normalization_distribution_test.py",
python_version = "PY3",
tags = ["no_oss"],
tags = [
"no_oss",
],
deps = [
":normalization",
":preprocessing_test_utils",

View File

@ -454,6 +454,7 @@ tf_py_test(
"//tensorflow/python/eager:backprop",
"//tensorflow/python/eager:context",
"//tensorflow/python/eager:def_function",
"//tensorflow/python/keras",
"//tensorflow/python/keras:combinations",
"//tensorflow/python/keras/engine",
"//tensorflow/python/keras/layers:core",
@ -488,6 +489,7 @@ tf_py_test(
"//tensorflow/python/eager:context",
"//tensorflow/python/eager:def_function",
"//tensorflow/python/eager:test",
"//tensorflow/python/keras",
"//tensorflow/python/keras:combinations",
"//tensorflow/python/keras/engine",
"//tensorflow/python/keras/layers:core",

View File

@ -90,7 +90,7 @@ class InterfaceTests(test.TestCase):
def testSaveWithOnlyKerasSession(self):
with ops.Graph().as_default():
with ops.Graph().as_default(), self.cached_session():
inp = input_layer.Input([1])
dense = core.Dense(1)(inp)
model = training.Model(inp, dense)