You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had the same question. I am looking at the provided example where ohem=0.1. I think if the intention were for ohem to be negative/positive then the example should probably use ohem = 10 instead. This makes me think that the intention is for ohem to be as specified in the comments: pos/neg, but the formula used should be changed to keep_num = min(int(pos_num / self.ohem_ratio / logits_size), neg_num)
In the code comment,
ohem_ratio
refers to themax ratio of positive/negative, defautls to 0.0, which means no ohem.
But later in the code, it is computing
keep_num
with a formulakeep_num = min(int(pos_num * self.ohem_ratio / logits_size), neg_num)
.Should the comment be changed to
negative/positive
?The text was updated successfully, but these errors were encountered: