snu-mllab / PuzzleMix

Official PyTorch implementation of "Puzzle Mix: Exploiting Saliency and Local Statistics for Optimal Mixup" (ICML'20)
MIT License
159 stars 17 forks source link

Is it right code in the transport function? #4

Closed rucy74 closed 3 years ago

rucy74 commented 3 years ago

https://github.com/snu-mllab/PuzzleMix/blob/86e271b93a4285e53b7023ace12d7a9770d0550c/mixup.py#L304

According to the algorithm in the paper, I think it should be in the for loop?

Janghyun1230 commented 3 years ago

Thank you for the comment. As shown in here (our ImageNet code) https://github.com/snu-mllab/PuzzleMix/blob/86e271b93a4285e53b7023ace12d7a9770d0550c/imagenet/lib/utils.py#L300-L310 that should be in the inner loop. I think we made a mistake when we cleaned up our code. I'll fix it. However, we made a multi-processing code for graph-cut and I'll upload it too. Thanks.