updates
This commit is contained in:
parent
2e680fb544
commit
5f9229ecaf
|
@ -372,8 +372,8 @@ def compute_loss(p, targets, model): # predictions, targets, model
|
||||||
# Define criteria
|
# Define criteria
|
||||||
BCEcls = nn.BCEWithLogitsLoss(pos_weight=ft([h['cls_pw']]), reduction=red)
|
BCEcls = nn.BCEWithLogitsLoss(pos_weight=ft([h['cls_pw']]), reduction=red)
|
||||||
BCEobj = nn.BCEWithLogitsLoss(pos_weight=ft([h['obj_pw']]), reduction=red)
|
BCEobj = nn.BCEWithLogitsLoss(pos_weight=ft([h['obj_pw']]), reduction=red)
|
||||||
BCE = nn.BCEWithLogitsLoss()
|
BCE = nn.BCEWithLogitsLoss(reduction=red)
|
||||||
CE = nn.CrossEntropyLoss() # weight=model.class_weights
|
CE = nn.CrossEntropyLoss(reduction=red) # weight=model.class_weights
|
||||||
|
|
||||||
if 'F' in arc: # add focal loss
|
if 'F' in arc: # add focal loss
|
||||||
g = h['fl_gamma']
|
g = h['fl_gamma']
|
||||||
|
|
Loading…
Reference in New Issue