This commit is contained in:
Glenn Jocher 2019-04-15 13:57:07 +02:00
parent 1191dee71b
commit 76bf9fceed
1 changed files with 1 additions and 1 deletions

View File

@ -243,7 +243,7 @@ def wh_iou(box1, box2):
def compute_loss(p, targets): # predictions, targets def compute_loss(p, targets): # predictions, targets
FT = torch.cuda.Tensor if p[0].is_cuda else torch.Tensor FT = torch.cuda.FloatTensor if p[0].is_cuda else torch.Tensor
lxy, lwh, lcls, lconf = FT([0]), FT([0]), FT([0]), FT([0]) lxy, lwh, lcls, lconf = FT([0]), FT([0]), FT([0]), FT([0])
txy, twh, tcls, indices = targets txy, twh, tcls, indices = targets
MSE = nn.MSELoss() MSE = nn.MSELoss()