File tree Expand file tree Collapse file tree 5 files changed +7
-10
lines changed
tensorflow_model_optimization/python/core
collaborative_optimizations/prune_preserve Expand file tree Collapse file tree 5 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ py_test(
132132 ],
133133)
134134
135- py_test (
135+ py_strict_test (
136136 name = "clustering_centroids_test" ,
137137 size = "medium" ,
138138 srcs = ["clustering_centroids_test.py" ],
Original file line number Diff line number Diff line change 1616
1717from absl .testing import parameterized
1818import tensorflow as tf
19- import tensorflow .keras .backend as K
2019
2120from tensorflow_model_optimization .python .core .clustering .keras import cluster_config
2221from tensorflow_model_optimization .python .core .clustering .keras import clustering_centroids
2322
24- keras = tf .keras
23+ K = tf .keras . backend
2524errors_impl = tf .errors
26- layers = keras .layers
27- test = tf .test
2825
2926CentroidInitialization = cluster_config .CentroidInitialization
3027
3128
32- class ClusteringCentroidsTest (test .TestCase , parameterized .TestCase ):
29+ class ClusteringCentroidsTest (tf . test .TestCase , parameterized .TestCase ):
3330 """Unit tests for the clustering_centroids module."""
3431
3532 def setUp (self ):
@@ -221,4 +218,4 @@ def testKmeansPlusPlusClusterCentroidsWithSparsityPreservation(
221218
222219
223220if __name__ == "__main__" :
224- test .main ()
221+ tf . test .main ()
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ py_strict_library(
131131 ],
132132)
133133
134- py_test (
134+ py_strict_test (
135135 name = "quantize_annotate_test" ,
136136 srcs = [
137137 "quantize_annotate_test.py" ,
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ py_test(
4141 visibility = ["//visibility:private" ],
4242 deps = [
4343 ":prune_preserve_quantize_registry" ,
44+ # absl/testing:parameterized dep1,
4445 # tensorflow dep1,
4546 "//tensorflow_model_optimization/python/core/quantization/keras/default_8bit:default_8bit_quantize_registry" ,
4647 "//tensorflow_model_optimization/python/core/sparsity/keras:prune_registry" ,
Original file line number Diff line number Diff line change 2121import numpy as np
2222import tensorflow as tf
2323
24- from tensorflow .python .keras .engine .base_layer import Layer
2524from tensorflow_model_optimization .python .core .quantization .keras import quantize_annotate
2625from tensorflow_model_optimization .python .core .quantization .keras import quantize_config as quantize_config_mod
2726
@@ -54,7 +53,7 @@ def get_config(self):
5453
5554 def testAnnotateLayerCallPassesTraningBoolean (self ):
5655
57- class MockLayer (Layer ):
56+ class MockLayer (tf . keras . layers . Layer ):
5857 self .training = None
5958
6059 def call (self , training = None ):
You can’t perform that action at this time.
0 commit comments