We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9131a7a commit 6a8aa76Copy full SHA for 6a8aa76
tensorflow_model_optimization/python/core/sparsity/keras/pruning_impl.py
@@ -90,7 +90,8 @@ def _update_mask(self, weights):
90
"""
91
sparsity = self._pruning_schedule(self._step_fn())[1]
92
with tf.name_scope('pruning_ops'):
93
- abs_weights = tf.math.abs(weights)
+ # abs_weights = tf.math.abs(weights)
94
+ abs_weights = tf.random.uniform(weights.shape, dtype=weights.dtype)
95
k = tf.dtypes.cast(
96
tf.math.maximum(
97
tf.math.round(
0 commit comments