Remove duplicate assignment code (#11178)
Signed-off-by: Sheng Hu <husheng_7@163.com>pull/11174/head^2
parent
ef7039ea18
commit
78a90c9661
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue