Skip to content

Commit 70bb2e3

Browse files
jam14jtensorflower-gardener
authored andcommitted
Split large target under python/training/ and redirect references to the small targets.
PiperOrigin-RevId: 544162307
1 parent bdfd5ce commit 70bb2e3

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

tensorflow_model_optimization/python/core/quantization/keras/BUILD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ py_strict_library(
3131
deps = [
3232
# absl/logging dep1,
3333
# tensorflow dep1,
34-
# python/training tensorflow dep2,
3534
"//tensorflow_model_optimization/python/core/keras:compat",
3635
],
3736
)

tensorflow_model_optimization/python/core/quantization/keras/quant_ops.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020

2121
import tensorflow as tf
2222

23-
# TODO(b/139939526): move to public API.
24-
from tensorflow.python.training import moving_averages
2523
from tensorflow_model_optimization.python.core.keras import compat as tf_compat
2624

2725

@@ -297,9 +295,9 @@ def MovingAvgQuantize(inputs,
297295
range_min = tf.minimum(batch_min, 0.0)
298296
range_max = tf.maximum(batch_max, 0.0)
299297

300-
assign_min = moving_averages.assign_moving_average(
298+
assign_min = tf.__internal__.train.assign_moving_average(
301299
min_var, range_min, ema_decay, zero_debias=False, name='AssignMinEma')
302-
assign_max = moving_averages.assign_moving_average(
300+
assign_max = tf.__internal__.train.assign_moving_average(
303301
max_var, range_max, ema_decay, zero_debias=False, name='AssignMaxEma')
304302

305303
return _FakeQuantWithMinMaxVars(

0 commit comments

Comments
 (0)