Remove duplicate assignment code (#11178)

Signed-off-by: Sheng Hu <husheng_7@163.com>
This commit is contained in:
Sheng Hu authored and GitHub committed 2023-03-23 11:29:44 +01:00
1 parent ef7039ea18
commit 78a90c9661
1 file changed
-1
-1
View File
@@ -16,7 +16,6 @@ class ComputeLoss:
self.overlap = overlap
device = next(model.parameters()).device # get model device
h = model.hyp # hyperparameters
self.device = device
# Define criteria
BCEcls = nn.BCEWithLogitsLoss(pos_weight=torch.tensor([h['cls_pw']], device=device))