alinlab / M2m

Code for the paper "M2m: Imbalanced Classification via Major-to-minor Translation" (CVPR 2020)

Home Page:http://arxiv.org/abs/2004.00431

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Per-class probablibity being treated as per-sample probability.

souravraha opened this issue · comments

M2m/train.py

Line 167 in 42d08a5

select_idx = torch.multinomial(p_accept, 1, replacement=True).view(-1)

@jh-jeong
In the line above p_accept is supposed to be "per-class" probability distribution. This is according to the definition of torch.multinomial. However, the implementation is treating it as a per-sample probability distribution. This is not how the subsection "Practical implementation via re-sampling" of https://arxiv.org/pdf/2004.00431.pdf describes this to be implemented. Could you shed some light on this? Thanks!