Comments (4)
Thanks for the question.
We propose to mix the two targets not using a single target in the paper. As you can see (1) and Appendix A1.
Here, each "y" is a one-hot label (thus an example of \hat y is [0.6, 0.4, 0, 0, 0])
Note that computing the cross-entropy between the mixed target and the prediction is equivalent to mix two cross entropies with a single target, i.e.,
CE(mixed_label_between_ya_yb, prediction) = lambda * CE(ya, prediction) + (1 - lambda) CE(yb, prediction)
The above equation is easily derived from the definition of the cross entropy.
There is no change after we made the first version of the CutMix algorithm, and our code is consistent with our paper.
Thanks
from cutmix-pytorch.
I'm greatly appreciated for your prompt response!
I didn't notice the equivalence be satisfied before!
But still wondering, is there a particular issue on implementing with CE(mixed_label_between_ya_yb, prediction)? Why did you implement with the equivalent form, not the original one? At first glance, the original formula is also equally easy to implement.
Thank you!
from cutmix-pytorch.
@shim94kr
Technically speaking, the CE
in my comment and CE
in PyTorch is not equivalent.
The cross entropy implementation of PyTorch, and most ML frameworks, gets "index" not the probability itself. I.e., "target" is not a one-hot (e.g., [1, 0, 0, 0, ...]) but index value (e.g., 34) for PyTorch CE.
Since the cross entropy implementation is highly optimized ("This criterion combines LogSoftmax and NLLLoss in one single class" from the document), we do not create our own CE implementation.
See the official document for the details.
from cutmix-pytorch.
I'm now clear on this issue. Thank you!
from cutmix-pytorch.
Related Issues (20)
- cutmix for segmentation HOT 1
- How could I use cutmix in object detection? HOT 1
- question about code in object detection HOT 2
- cutmix for segmentation HOT 1
- Could you please to figure out how to train on Pascal VOC? HOT 2
- About the probability of applying CutMix HOT 6
- Have you tried using feature-level CutMix and image-level CutMix at the same time? HOT 2
- Clarification about CutMix HOT 3
- Object Detection about
- CutMix for Image Captioning HOT 4
- Any COCO pretrained models Yet? HOT 1
- Reproducibility Issue again HOT 6
- About the hyper-parameter alpha of mixup HOT 5
- About the result of PyramidNet-110 baseline in the paper HOT 1
- Scripts for mentioned experiments HOT 4
- what should I change to use this concept on my data set HOT 3
- Clarification on in-between class samples results HOT 2
- Can Cutmix work well with CosFace?
- The difference between the enhanced image and the expected image is significant HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cutmix-pytorch.