I am trying to scale the contribution of the positive samples and negative samples in the classification loss (l_cls) differentially in the multitask loss function(L) of RPN in Faster-RCNN.
As far as I know, the straight forward way to do this in Caffe is to use ‘InfoGainLossLayer’ and pass an infoGainMatrix(H) which contains the different scales. Unfortunately, to my knowledge, the infoGainMatrix(H) cannot be computed on the fly and passed to InfoGainLossLayer. (ref). I would like to have my H computed dynamically.
It would be great if anyone could explain how this can be circumvented.