Keras, binary segmentation, add weight to loss function

前端 未结 2 1840
一向
一向 2020-12-12 05:32

I\'m solving a binary segmentation problem with Keras (w. tf backend). How can I add more weight to the center of each area of mask?

I\'ve tried dice coef with adde

2条回答
  •  粉色の甜心
    2020-12-12 06:17

    I'm implementing this solution but I wonder what should be the ground truth that we must give to the network. That is, now the output is the loss, and we want the loss to be 0, so should we train the network as follows?

    model = get_unet_w_lambda_loss()
    model.fit([inputs, weights, masks], zero_images)
    

提交回复
热议问题