junyeoplee / fast-autoaugment-efficientnet-pytorch Goto Github PK
View Code? Open in Web Editor NEWA Pytorch implementation of Fast AutoAugment and EfficientNet
A Pytorch implementation of Fast AutoAugment and EfficientNet
Thanks for your work on pytorch.
In the searching space, you find two of extra transformations here.
Why two? It's better to find the combination of arbitrary transformations, isn't it?
Finally, only one transformation is picked randomly here, why??
If there are any misunderstanding, please correct me, thx.
First, thanks a lot for your reimplementation for the fast-autoaugment. It really helped me a lot.
But after carefully checking your code, I need to point out your problem in understanding this paper. Actually, the stratified shuffling will make the search part to have K models instead of one model. That's to say, for each split of k-fold, you will have a model and have corresponding best policy and then you combine the top-n policy from 5 fold. However, in your implementation, you only have one model. That's not good. But you achieved good performance which in turn prove the fast-autoaugment is a useful method.
HI,Thanks a lot for your code.And i met this error as the titile shown(AttributeError: 'Args' object has no attribute 'use_seblock') when i trained the network.
[+] Create network
Traceback (most recent call last):
File "/home/leinao/models/efficientnet/train.py", line 98, in
fire.Fire(train)
File "/home/leinao/.local/lib/python3.9/site-packages/fire/core.py", line 141, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/home/leinao/.local/lib/python3.9/site-packages/fire/core.py", line 466, in _Fire
component, remaining_args = _CallAndUpdateTrace(
File "/home/leinao/.local/lib/python3.9/site-packages/fire/core.py", line 681, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "/home/leinao/models/efficientnet/train.py", line 35, in train
model = select_model(args)
File "/home/leinao/models/efficientnet/utils.py", line 112, in select_model
model = Net(args)
File "/home/leinao/models/efficientnet/networks/efficientnet_cifar10.py", line 156, in init
self.use_seblock = args.use_seblock
AttributeError: 'Args' object has no attribute 'use_seblock'
Excuse me, could you tell me how do you visualize the found policy? Because there are many sub-policy, which consists of two op, and each op has its prob and magnitude, which different from each other (even the ops are same, the probs and magnitudes are still different). So my question is, how do you visualize the found policy? Do you average the probs and magnitudes for each op, or have you done something else? Thank you very much!
Hello,I run python train.py --seed=24 --scale=3 --optimizer=sgd --fast_auto_augment=True
. A warning is reported as follow:
/disk1/jinlin2/anaconda3/envs/fast-auto-aug/lib/python3.7/multiprocessing/semaphore_tracker.py:144: UserWarning: semaphore_tracker: There appear to be 1 leaked semaphores to clean up at shutdown len(cache))
Hi. Thank you for the code. I couldn't find any mentions about the license used for this repository, could you please clarify it?
Hi, now I can run your code,thank your for your work, but I want to search on my own dataset, in your utils.py, there is no other dataset to choose, what can i do ?
resnet34 results can be shown:
python train.py --seed=24 --scale=5 --optimizer=sgd --fast_auto_augment=True
.........
[+] Training step: 62000/64000 Training epoch: 0/351 Elapsed time: 318.71min Learning rate: 0.0011729701340847298
Acc@1 : 88.281%
Acc@5 : 99.219%
Loss : 0.3259652554988861
FW Time : 104.842ms
BW Time : 152.699ms
[+] Valid results
Acc@1 : 91.840%
Acc@5 : 99.880%
Loss : 1.2543833255767822
I also test resnet20.
with fast-automentation: valid Acc@1:92.18%
without fast-automentaion valid:Acc@1:92.2%
Pre-policies..........................................................92.4%
and I download found-policies,It has 80 subpolices.
But I use you project,It only generated 8 subpolices to random choice.
the generated 8 subpolices is like the following.
RandomChoice(
Compose(
Pad(padding=4, fill=0, padding_mode=constant)
RandomCrop(size=(32, 32), padding=None)
RandomHorizontalFlip(p=0.5)
Contrast(prob=0.76, magnitude=0.20)
ShearXY(prob=0.91, magnitude=0.54)
ToTensor()
)
Compose(
Pad(padding=4, fill=0, padding_mode=constant)
RandomCrop(size=(32, 32), padding=None)
RandomHorizontalFlip(p=0.5)
Contrast(prob=0.75, magnitude=0.54)
Posterize(prob=0.70, magnitude=0.63)
ToTensor()
)
Compose(
Pad(padding=4, fill=0, padding_mode=constant)
RandomCrop(size=(32, 32), padding=None)
RandomHorizontalFlip(p=0.5)
Sharpness(prob=0.19, magnitude=0.90)
Brightness(prob=0.22, magnitude=0.92)
ToTensor()
)
Compose(
Pad(padding=4, fill=0, padding_mode=constant)
RandomCrop(size=(32, 32), padding=None)
RandomHorizontalFlip(p=0.5)
Brightness(prob=0.09, magnitude=0.28)
TranslateXY(prob=0.38, magnitude=0.16)
ToTensor()
)
Compose(
Pad(padding=4, fill=0, padding_mode=constant)
RandomCrop(size=(32, 32), padding=None)
RandomHorizontalFlip(p=0.5)
Contrast(prob=0.29, magnitude=0.31)
Color(prob=0.57, magnitude=0.39)
ToTensor()
)
Compose(
Pad(padding=4, fill=0, padding_mode=constant)
RandomCrop(size=(32, 32), padding=None)
RandomHorizontalFlip(p=0.5)
Color(prob=0.64, magnitude=0.66)
Sharpness(prob=0.69, magnitude=0.87)
ToTensor()
)
Compose(
Pad(padding=4, fill=0, padding_mode=constant)
RandomCrop(size=(32, 32), padding=None)
RandomHorizontalFlip(p=0.5)
Equalize(prob=0.48, magnitude=0.84)
Brightness(prob=0.76, magnitude=0.00)
ToTensor()
)
Compose(
Pad(padding=4, fill=0, padding_mode=constant)
RandomCrop(size=(32, 32), padding=None)
RandomHorizontalFlip(p=0.5)
Equalize(prob=0.33, magnitude=0.21)
AutoContrast(prob=0.50, magnitude=0.86)
ToTensor()
)
)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.