diff --git a/utils/loss.py b/utils/loss.py index 02f945a767c3..14eed55c665f 100644 --- a/utils/loss.py +++ b/utils/loss.py @@ -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 diff --git a/val.py b/val.py index b73a3f79c276..fee9fadf6258 100644 --- a/val.py +++ b/val.py @@ -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