DeepSegment/FCN-GoogLeNet

How to remove the effect of backgroud??

lily10086 opened this issue · 1 comments

When I read your code ,The loss it tf.reduce_mean(tf.nn.sparse~~),The image‘s background also included,How to remove it??

Hi,

Sorry for such a late reply. I've been quite occupied with other projects recently... Anyway, to my knowledge, this issue should be easy to fix. You can either choose to set the label of background to -1 to ignore it when computing loss, or use tf.losses.compute_weighted_loss in front of tf.nn.sparse~. For more details, you can turn to TheRevanchist and JimmyCai91's comments in the following link:
keras-team/keras#6118

Cheers,
Tianxiao