Conversation
@@ -178,7 +178,8 @@ def loss(self, output, labels): | |||
weight = (all_size - num_label) / all_size | |||
loss_weight.append(weight) | |||
|
|||
loss_weight = tf.Print(loss_weight, loss_weight, message="loss_weight:") | |||
if self.is_debug: | |||
loss_weight = tf.Print(loss_weight, loss_weight, message="loss_weight:") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@suttang
Thanks.
Owner approve.
FYI, I read document of tf.Print
and found this feature was deprecated.
tf.print
is recommended. But for this time, just adding if
is ok.
https://www.tensorflow.org/api_docs/python/tf/Print
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iizukak Oh, thank you for your information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Readability Approval
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Motivation and Context
During semantic segmentation training, debug messages are displayed even though
IS_DEBUG=False
.This PR fixes #412
Description
Check debug condition before
tf.Print
.How has this been tested?
Screenshots (if appropriate):
Types of changes
Checklist: