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
|
||||
BCEcls = nn.BCEWithLogitsLoss(pos_weight=ft([h['cls_pw']]), reduction=red)
|
||||
BCEobj = nn.BCEWithLogitsLoss(pos_weight=ft([h['obj_pw']]), reduction=red)
|
||||
BCE = nn.BCEWithLogitsLoss()
|
||||
CE = nn.CrossEntropyLoss() # weight=model.class_weights
|
||||
BCE = nn.BCEWithLogitsLoss(reduction=red)
|
||||
CE = nn.CrossEntropyLoss(reduction=red) # weight=model.class_weights
|
||||
|
||||
if 'F' in arc: # add focal loss
|
||||
g = h['fl_gamma']
|
||||
|
|
Loading…
Reference in New Issue