How to do weighted softmax output custom op in mxnet?
问题 I want to replace mx.symbol.SoftmaxOutput with the weighted version (assign different weight respect to label's frequency in the whole dataset) The original function works well like below: cls_prob = mx.symbol.SoftmaxOutput(data=data, label=label, multi_output=True, normalization='valid', use_ignore=True, ignore_label=-1, name='cls_prob') The current code I wrote as below. The code can run without errors, but the loss quickly explode to nan. I am dealing with detection problem, RCNNL1 loss