clovaai / CutMix-PyTorch

Official Pytorch implementation of CutMix regularizer
MIT License
1.22k stars 159 forks source link

Same lambdas(drawn from beta dist.) applied to multiple data in the same mini-batch #4

Closed ildoonet closed 5 years ago

ildoonet commented 5 years ago

https://github.com/clovaai/CutMix-PyTorch/blob/master/train.py#L233

Can it be improved if we use different(diverse) lambdas for each data?

hellbell commented 5 years ago

@ildoonet Thank you for a good suggestion. Similar to the answer for https://github.com/clovaai/CutMix-PyTorch/issues/3#issuecomment-512111709 , we consider the efficiency for loading data and also simplicity of implementation, so we fix the lambda and the position of the random region for all the images in the mini-batch. We didn't check the performance improvement when we change the lambda and cropping position, we will be very happy if you train CutMix with that mechanism. After verifying, please PR with configure option (e.g. '--diverse-lambda' or '--diverse-position').