Comments (16)
For the results on ImageNet, I use 8 Titan XP but it still takes a long period of time for training.
At the early stage of this project, I use ResNet-18 with a downsampled ImageNet to quickly see some signals.
The downsampled ImageNet in my initial experiments contains 200 classes (same as Tiny-ImageNet), 100,000 images (500 images per class) for training, and 10,000 images (50 images per class) for validation. These images are randomly selected from ImageNet.
from shapetexturedebiasedtraining.
It's been a while since I ran the training script, so I am not that sure. The training time might also be different if the hardware (e.g., #CPU, #GPU) is different.
The training script prints a much accurate per-epoch time estimation, and then you could use that time to compute the total training time on your side. On my side, it takes about half a week for ResNet50, but, as again, it's been a while since I did experiments. If you want to speed up the training time, you can try to use DistributedDataParallel (instead of DataParallel) as the parallel strategy.
from shapetexturedebiasedtraining.
As I mentioned in #1 , when you use a small training batch size, the learning rate should be accordingly small. Could you try to set train-batch as 256 or set lr as 0.025? I don't know if there are other issues to fix since the performance is too low. What dataset do you use for training?
My script was:
python imagenet.py -a resnet50 --data $DATA --epochs 100 --schedule 30 60 90 --gamma 0.1 --checkpoint $MODEL_DIR --gpu-id 0,1,2,3,4,5,6,7 -j 8 --train-batch 256 --lr 0.1 --num_classes 1000 --mixbn --style --alpha 0.5 --lr_schedule step --multi_grid --label-mix-alpha 1 --warm_lr 0. --warm 5
from shapetexturedebiasedtraining.
Should be --label-gamma
. Sorry for the confusion.
from shapetexturedebiasedtraining.
Sure. I will check if I saved these models and get back to you. Please expect a little bit late response because I am catching a deadline next month.
from shapetexturedebiasedtraining.
from shapetexturedebiasedtraining.
Hi Yingwei~ In order to better schedule for my experiments, would you mind telling me what hardware you use to training the models?
from shapetexturedebiasedtraining.
Thank you very much for the quick reply!!
from shapetexturedebiasedtraining.
It's me again :) Thank you for your patient and quick response! I wonder if you still remember how many days does it takes your to train a model (for ResNet50 or other models)? (A approximation will be just fine! So that I can have an estimate on my experiments.)
from shapetexturedebiasedtraining.
Thank you very much for your advice and reply. It's very helpful and important to my future research!! : )
from shapetexturedebiasedtraining.
Hi LiYing, I had tried to train the texture/shape biased model with label-gamma = 0,1.
( With training command:
python imagenet.py -a resnet50 --data $DATA --epochs 100 --schedule 30 60 90 --checkpoint $MODEL_DIR --gpu-id 0 --train-batch 64 --lr 0.1 --mixbn --style --multi_grid --labeled-gamma 1
)
But I only got around 33% validate accuracy for the extreme biased models(labeled gamma =1/0). It's not even close to the reported number in paper Table 1 (which is around 76%). I wonder if I were using the same setting as the reported model in Table 1. If possible, would you mind to check the hyper parameter settings for that extreme models for me?
Or Could you spot on any possible issues that might cause this huge difference?
Thank you very much!
from shapetexturedebiasedtraining.
@LiYingwei I use ILSVRC2012-1k to train the model.
Thank you for your advise! I will try to set lr as 0.025.
from shapetexturedebiasedtraining.
@LiYingwei I can not find the parameter --label-mix-alpha
in script imagenet.py
. Could you please double check your training command? Or maybe we are using different version?
from shapetexturedebiasedtraining.
Gotha! Thank you! : )
from shapetexturedebiasedtraining.
As promised, here are the Shape- and Texture-biased ResNet-50 models.
res50-shape-biased.pth.tar
res50-texture-biased.pth.tar
from shapetexturedebiasedtraining.
from shapetexturedebiasedtraining.
Related Issues (11)
- Question about training dataset HOT 2
- imagenet-a HOT 2
- Ensemble of two models HOT 1
- FGSM Attack HOT 1
- StyleTransfer problem HOT 3
- Question about the label of style for original image
- CAM to visualize which image regions are attended by models
- FileNotFoundError: Couldn't find any class folder in C:/datasets/ILSVRC/Data/CLS-LOC\val HOT 1
- RuntimeError: No CUDA GPUs are available HOT 2
- Models trained and evaluated on ImageNet-200 are Center Cropped to 224?
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 shapetexturedebiasedtraining.