Skip to content

Commit 71a7975

Browse files
authored
Update loss.py
correct typo
1 parent 4174703 commit 71a7975

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

efficientdet/loss.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,8 @@ def forward(self, classifications, regressions, anchors, annotations, **kwargs):
5757
if torch.cuda.is_available()
5858

5959
alpha_factor = torch.ones_like(classification) * alpha
60-
targets = targets.cuda()
6160
alpha_factor = alpha_factor.cuda()
62-
alphe_factot = 1. - alpha_factor
61+
alpha_factor = 1. - alpha_factor
6362
focal_weight = classification
6463
focal_weight = alpha_factor * torch.pow(focal_weight, gamma)
6564

@@ -72,7 +71,7 @@ def forward(self, classifications, regressions, anchors, annotations, **kwargs):
7271
else:
7372

7473
alpha_factor = torch.ones_like(classification) * alpha
75-
alphe_factot = 1. - alpha_factor
74+
alpha_factor = 1. - alpha_factor
7675
focal_weight = classification
7776
focal_weight = alpha_factor * torch.pow(focal_weight, gamma)
7877

0 commit comments

Comments
 (0)