Skip to content

Commit

Permalink
tweak #4
Browse files Browse the repository at this point in the history
  • Loading branch information
szemenyeim committed Aug 8, 2019
1 parent bb772d2 commit 4e1015c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion models.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def forward(self, x, targets=None):
loss_y = self.mse_loss(y[mask], ty[mask])
loss_w = self.mse_loss(w[mask], tw[mask])
loss_h = self.mse_loss(h[mask], th[mask])
loss_conf = 30*self.bce_loss(pred_conf[conf_mask_false], tconf[conf_mask_false]) + 1*self.bce_loss(
loss_conf = 40*self.bce_loss(pred_conf[conf_mask_false], tconf[conf_mask_false]) + 1*self.bce_loss(
pred_conf[conf_mask_true], tconf[conf_mask_true]
)
#loss_cls = (1 / nB) * self.ce_loss(pred_cls[mask], torch.argmax(tcls[mask], 1))
Expand Down
2 changes: 1 addition & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def valid(epoch,epochs,bestLoss,pruned):
learning_rate = opt.lr/2 if opt.transfer else opt.lr
dec = opt.decay if finetune else opt.decay/10
transfers = ([3, 5, 8, 11] if opt.bn else [3, 5, 7, 9]) if opt.transfer else [0]
decays = [dec*25, dec*10, dec*5, dec*2.5, dec] if (finetune and not opt.transfer) else [dec]
decays = [dec*50, dec*20, dec*10, dec*5, dec] if (finetune and not opt.transfer) else [dec]
if opt.singleDec:
decays = [dec*20]
halfRes = opt.hr
Expand Down

0 comments on commit 4e1015c

Please sign in to comment.