From 76bf9fceed0d16726bac0407fd2fb40cbb18a1cd Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 15 Apr 2019 13:57:07 +0200 Subject: [PATCH] updates --- utils/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/utils.py b/utils/utils.py index 165a0f4b..7a584026 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -243,7 +243,7 @@ def wh_iou(box1, box2): 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]) txy, twh, tcls, indices = targets MSE = nn.MSELoss()