Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what is the value range of magnitude in auto-augment when the MAX_LEVEL is set as 10. #63

Closed
cddlyf opened this issue Dec 23, 2019 · 5 comments

Comments

@cddlyf
Copy link

cddlyf commented Dec 23, 2019

Dear @rwightman , I have read the code about auto-augmentation and random-augmentation, and I noticed that the MAX_LEVEL is set as 10, same as the google's implementation. Also in the google implementation, they say an optimal magnitude is often in [5, 30]. But in your implementation you clip the input magnitude to be less than MAX_LEVEL (magnitude = min(_MAX_LEVEL, max(0, magnitude)) # clip to valid range).

Could you give me some hints about why MAX_LEVEL is set as 10, but the input magnitude range is recommended as [5, 30]? Really thanks!

@rwightman
Copy link
Collaborator

@cddlyf I've asked Google about this in their TPU repository but have yet to receive a response: tensorflow/tpu#614 ... someone else recently inquired about this as well: tensorflow/tpu#637

At this point I have created this version with the assumption that it does not make sense to exceed 10 for the magnitude and I have enforced that by clipping as yous ay. I feel the paper used a different magnitude for greater granularity while running experiments and that they indended to switch to 0-10 for the released implementation. That makes the most sense to me but could be incorrect.

@rwightman
Copy link
Collaborator

BTW, take a look at this branch, I'm currently integrating a version of AugMix with my AA and RA. Added some increasing only versions of ops that I intend to run some RA experiments with...
https://github.com/rwightman/pytorch-image-models/tree/augmix-jsd

@cddlyf
Copy link
Author

cddlyf commented Dec 25, 2019

@rwightman Great man! Thanks for your timely response and happy Christmas!

@cddlyf
Copy link
Author

cddlyf commented Dec 25, 2019

@rwightman Another question I encountered is that when I calculate the flops using the script like https://github.com/Lyken17/pytorch-OpCounter, the calculated flops is about 180 M for mixnet-small. However, the number shown in their paper is 256M. Do you have any hint about this? And what is your flops results for mixnet?

@rwightman
Copy link
Collaborator

@cddlyf I haven't seen one of those FLOP counters that works properly and doesn't miss things. The only way I've counted FLOPs accuratly is to export to ONNX/Caffe2 and then run the Caffe2 benchmark with the correct input size. I've got some scripts to do that in this repo https://github.com/rwightman/gen-efficientnet-pytorch .... the FLOP/MADDS recorded for these networks in the papers are done assuming opimitzaiton for inference, with the BatchNorm layers folded into the Conv layers, so run the ONNX optimizer before exporting to Caffe2 for the benchmark.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants