Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.

fix debug display condition #432

Merged
merged 2 commits into from Sep 18, 2019
Merged

fix debug display condition #432

merged 2 commits into from Sep 18, 2019

Conversation

suttang
Copy link
Contributor

@suttang suttang commented Sep 17, 2019

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature / Optimization (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@suttang suttang self-assigned this Sep 17, 2019
@blueoil-butler blueoil-butler bot added the CI: auto-run Run CI automatically label Sep 17, 2019
@@ -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:")
Copy link
Member

@iizukak iizukak Sep 18, 2019

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

Copy link
Contributor Author

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.

Copy link
Contributor

@tsawada tsawada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Readability Approval

Copy link
Contributor

@tkng tkng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tkng tkng merged commit 314355b into blue-oil:master Sep 18, 2019
@suttang suttang deleted the fix/debug-log-segmentation branch September 19, 2019 02:23
ananno pushed a commit to ananno/blueoil that referenced this pull request Sep 27, 2019
@iizukak iizukak added this to the v0.12.0 milestone Oct 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CI: auto-run Run CI automatically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In segmentation/base.py, a debug print is displayed.
4 participants