pemujo commited on
Commit
90b8bf7
·
1 Parent(s): f4b8074

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -26,6 +26,7 @@ def real_dice_coeff(y_true, y_pred):
26
  dice_score = (2.0 * intersection + smooth) / (K.sum(y_true_flatten) + K.sum(y_pred_flatten) + smooth)
27
  return dice_score
28
 
 
29
 
30
  dice_loss = sm.losses.DiceLoss(class_weights = weights)
31
  focal_loss = sm.losses.CategoricalFocalLoss()
 
26
  dice_score = (2.0 * intersection + smooth) / (K.sum(y_true_flatten) + K.sum(y_pred_flatten) + smooth)
27
  return dice_score
28
 
29
+ weights = [0.5,0.5] # hyper parameter
30
 
31
  dice_loss = sm.losses.DiceLoss(class_weights = weights)
32
  focal_loss = sm.losses.CategoricalFocalLoss()