Skip to content

Commit

Permalink
Removed Logs ultralytics#4
Browse files Browse the repository at this point in the history
  • Loading branch information
manole-alexandru committed Mar 23, 2023
1 parent 6ba70e5 commit bef3e29
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion utils/loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def __call__(self, preds, targets, seg_masks): # predictions, targets

# Mask Loss
# print('\n----------- PRED VALID: ', torch.all(pred_mask >= 0), '-----------------\n')
print('\n----------- SEG MASK VALID: ', torch.all(seg_masks >= 0), '-----------------\n')
# print('\n----------- SEG MASK VALID: ', torch.all(seg_masks >= 0), '-----------------\n')
seg_loss = nn.functional.binary_cross_entropy_with_logits(pred_mask, seg_masks, reduction='none').mean()
lseg += seg_loss

Expand Down
4 changes: 2 additions & 2 deletions val.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ def compute_seg_iou(pred, target, n_classes=2):
pred[pred >= 0.5] = 1
pred = pred.view(-1)
target = target.view(-1)
print(target)
print(pred)
# print(target)
# print(pred)

# Ignore IoU for background class ("0")
for cls in range(1, n_classes): # This goes from 1:n_classes-1 -> class "0" is ignored
Expand Down

0 comments on commit bef3e29

Please sign in to comment.