Skip to content

Commit

Permalink
readded seg objective #1
Browse files Browse the repository at this point in the history
  • Loading branch information
manole-alexandru committed Mar 20, 2023
1 parent de596c8 commit ba46faf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def __call__(self, preds, targets, seg_masks): # predictions, targets

# return (lbox + lobj + lcls) * bs, torch.cat((lbox, lobj, lcls)).detach()
# return total_loss, torch.cat((lbox, lobj, lcls, lseg)).detach()
return (lbox + lobj + lcls) * bs * 1, lseg * bs * 0, torch.cat((lbox, lobj, lcls, lseg)).detach()
return (lbox + lobj + lcls) * bs * 1, lseg * bs * 0.2, torch.cat((lbox, lobj, lcls, lseg)).detach()

def build_targets(self, p, targets):
# Build targets for compute_loss(), input targets(image,class,x,y,w,h)
Expand Down

0 comments on commit ba46faf

Please sign in to comment.