Hi,
I would likw to custom BCE to the following form:
L = sigma_over_i( w_pos * a_i * log(p(a_i | x_i)) + w_neg * (1 - a_i) * log(1 - p(a_i | x_i)))
Means, to add two sets of weight vectors to the regular BCE. The first relates to the positive prediction case and the second to the negative case.
The pytorch BCE loss is based on this function: torch.binary_cross_entropy_with_logits that can get only pos_weight.
Is there any modification that can be done in order to implemet this function, besided the idea of re-writing it independently.
Thnak you,
Roy