Remove duplicate assignment code (#11178)

Signed-off-by: Sheng Hu <husheng_7@163.com>
pull/11174/head^2
Sheng Hu 2023-03-23 18:29:44 +08:00 committed by GitHub
parent ef7039ea18
commit 78a90c9661
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 1 deletions

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))