This commit is contained in:
lynn 2019-10-01 21:45:46 +08:00
parent f0d8e13313
commit 7e741b2985
2 changed files with 1 additions and 2 deletions

View file

@ -185,7 +185,7 @@ class YOLOLayer(nn.Module):
#loss = torch.exp(-self.s_r)*lbox + torch.exp(-self.s_c)*lconf + torch.exp(-self.s_id)*lid + \
# (self.s_r + self.s_c + self.s_id)
#loss *= 0.5
loss = 1*lbox + 1*lconf + 1*lid
loss = 0*lbox + 0*lconf + 1*lid
return loss, loss.item(), lbox.item(), lconf.item(), lid.item(), nT

View file

@ -55,7 +55,6 @@ def test(
outputs, mAPs, mR, mP, TP, confidence, pred_class, target_class, jdict = \
[], [], [], [], [], [], [], [], []
AP_accum, AP_accum_count = np.zeros(nC), np.zeros(nC)
coco91class = coco80_to_coco91_class()
for batch_i, (imgs, targets, paths, shapes, targets_len) in enumerate(dataloader):
t = time.time()
output = model(imgs.cuda())