Skip to content

Commit c2c88d4

Browse files
Replace tensorflow.python.keras with keras. tensorflow.python.keras is an old copy and is deprecated.
PiperOrigin-RevId: 485551171
1 parent abce63c commit c2c88d4

File tree

3 files changed

+2
-14
lines changed

3 files changed

+2
-14
lines changed

tensorflow_model_optimization/python/core/quantization/keras/collaborative_optimizations/cluster_preserve/cluster_preserve_integration_test.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import numpy as np
1818
import tensorflow as tf
1919

20-
from tensorflow.python.keras import keras_parameterized
2120
from tensorflow_model_optimization.python.core.clustering.keras import cluster
2221
from tensorflow_model_optimization.python.core.clustering.keras import cluster_config
2322
from tensorflow_model_optimization.python.core.clustering.keras.experimental import cluster as experimental_cluster
@@ -30,7 +29,6 @@
3029
layers = tf.keras.layers
3130

3231

33-
@keras_parameterized.run_all_keras_modes
3432
class ClusterPreserveIntegrationTest(tf.test.TestCase, parameterized.TestCase):
3533

3634
def setUp(self):

tensorflow_model_optimization/python/core/quantization/keras/collaborative_optimizations/cluster_preserve/cluster_preserve_quantize_registry_test.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,8 @@
1414
# ==============================================================================
1515
"""Tests for ClusterPreserveQuantizeRegistry."""
1616

17-
from absl.testing import parameterized
18-
1917
import tensorflow as tf
2018

21-
from tensorflow.python.keras import keras_parameterized
2219

2320
from tensorflow_model_optimization.python.core.clustering.keras import clustering_registry
2421
from tensorflow_model_optimization.python.core.quantization.keras import quantize_config
@@ -29,9 +26,7 @@
2926
layers = tf.keras.layers
3027

3128

32-
@keras_parameterized.run_all_keras_modes
33-
class ClusterPreserveQuantizeRegistryTest(tf.test.TestCase,
34-
parameterized.TestCase):
29+
class ClusterPreserveQuantizeRegistryTest(tf.test.TestCase):
3530

3631
def setUp(self):
3732
super(ClusterPreserveQuantizeRegistryTest, self).setUp()

tensorflow_model_optimization/python/core/quantization/keras/collaborative_optimizations/prune_preserve/prune_preserve_quantize_registry_test.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@
1313
# limitations under the License.
1414
# ==============================================================================
1515
"""Tests for PrunePreserveQuantizeRegistry."""
16-
from absl.testing import parameterized
17-
1816
import tensorflow as tf
1917

20-
from tensorflow.python.keras import keras_parameterized
2118
from tensorflow_model_optimization.python.core.quantization.keras import quantize_config
2219
from tensorflow_model_optimization.python.core.quantization.keras.collaborative_optimizations.prune_preserve import (
2320
prune_preserve_quantize_registry,)
@@ -28,9 +25,7 @@
2825
layers = tf.keras.layers
2926

3027

31-
@keras_parameterized.run_all_keras_modes
32-
class PrunePreserveQuantizeRegistryTest(tf.test.TestCase,
33-
parameterized.TestCase):
28+
class PrunePreserveQuantizeRegistryTest(tf.test.TestCase):
3429

3530
def setUp(self):
3631
super(PrunePreserveQuantizeRegistryTest, self).setUp()

0 commit comments

Comments
 (0)