diff options
author | 2018-06-05 15:22:07 +0200 | |
---|---|---|
committer | 2018-06-05 15:22:07 +0200 | |
commit | e106a458dd26db58c7d5abbd4afef60f8ce33252 (patch) | |
tree | a9fac9a50884a0b91113886deb57a7f5c2788683 /tensorflow/contrib/model_pruning | |
parent | f9c7fe82cb930ee26d281e4bf21211ed352d176e (diff) |
Prevent redundant ":0" in summary names
Take identical approach as is done with thresholds: using tf.Variable.op.name instead of tf.Variable.name, to prevent TensorFlow saying summary names are illegal (due to ":")
Diffstat (limited to 'tensorflow/contrib/model_pruning')
-rw-r--r-- | tensorflow/contrib/model_pruning/python/pruning.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/contrib/model_pruning/python/pruning.py b/tensorflow/contrib/model_pruning/python/pruning.py index 4b7af18b33..e6f9acc139 100644 --- a/tensorflow/contrib/model_pruning/python/pruning.py +++ b/tensorflow/contrib/model_pruning/python/pruning.py @@ -520,7 +520,7 @@ class Pruning(object): thresholds = get_thresholds() for index, mask in enumerate(masks): if not self._exists_in_do_not_prune_list(mask.name): - summary.scalar(mask.name + '/sparsity', nn_impl.zero_fraction(mask)) + summary.scalar(mask.op.name + '/sparsity', nn_impl.zero_fraction(mask)) summary.scalar(thresholds[index].op.name + '/threshold', thresholds[index]) |