facebookresearch/mixup-cifar10

should I transfer the label into one-hot?

Opened this issue · 2 comments

sxzy commented

Hey.
I am trying to use your code to train my model.
and I have noticed that y_a and y_b should be one-hot.so when I implement your code in my experiment ,should I encode the label which is integer into one-hot ???
and I have transfer it in one-hot and start train .....but I found that the correct is always zero.....

Yes, y_a and y_b are assumed to be one-hot encoding of labels. The CIFAR-10 code should serve as a working example -- you can print its variable type / size / etc. and make a side-by-side comparison with your implementation, which hopefully will give you enough information to debug your code.

Best,
Hongyi

Yes, y_a and y_b are assumed to be one-hot encoding of labels. The CIFAR-10 code should serve as a working example -- you can print its variable type / size / etc. and make a side-by-side comparison with your implementation, which hopefully will give you enough information to debug your code.

Best,
Hongyi

It's not one-hot encoding.
In this repo, you use the target, the index of the one-hot encoding. And you just use the original target, instead of y = λ*y1 + (1-λ)y2 different from what is mentioned in the paper.