Caffe CNN: multiple hierarchical losses for hierarchical classification

大城市里の小女人 提交于 2019-12-11 06:55:17

问题


I am familiar with how to use multiple loss in a CNN while all the labels of these loss are identical.

My case here is handling hierarchical labels using multiple losses, as shown in figure bellow:

loss1 is responsible for labelset1:{Sport, Food}. loss2 for labelset2:{volley, soccer}, loss3 for labelset3:{Pizza, Pasta, burger}. For example, Sample A∈{sport, soccer}, sample B∈{food,burger}.

Any ideas how to do this?


回答1:


Adding "don't care" lables, you should have three labels for each sample. For example: {sports, volleyball, don't care}.
Then you can have the three losses of type "SoftmaxWithLoss". For the two specific losses you should add ignore_label for the don't care labels.



来源:https://stackoverflow.com/questions/51574159/caffe-cnn-multiple-hierarchical-losses-for-hierarchical-classification

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!