jshtok / RepMet

Few-shot detection for visual categories
Apache License 2.0
110 stars 18 forks source link

about loss #5

Closed liyangliu closed 4 years ago

liyangliu commented 5 years ago

Hi, @jshtok

I find in the paper that there are only cross entropy loss and embed loss for few shot detection (as for the classification branch) image but in your code there is another loss called ADDITIONAL_LINEAR_CLS_LOSS. https://github.com/jshtok/RepMet/blob/d5b13e01940bbb7ed59dd1ff073e03c0808f76c0/fpn/symbols/resnet_v1_101_fpn_dcn_rcnn_oneshot_v3.py#L1167-L1168 https://github.com/jshtok/RepMet/blob/d5b13e01940bbb7ed59dd1ff073e03c0808f76c0/fpn/symbols/resnet_v1_101_fpn_dcn_rcnn_oneshot_v3.py#L1205-L1206 What is this loss used for ? Thanks.

jshtok commented 4 years ago

Dear Liyang, The ADDITIONAL_LINEAR_CLS_LOSS is a cross-entropy loss computed for an additional linear classifier, trained together with the distance-based classifier. You can see the layer in fpn/symbols/resnet_v1_101_fpn_dcn_rcnn_oneshot_v3.py, line 1167. It is used during the training on base classes, and discarded for the few-shot experiments.