Comments (8)
@PotatoThanh
That makes sense. Probably I forgot to add a couple of commands to rename and delete files or something.
Thank you for pointing out! I'll update the instructions.
from torchdistill.
Actually, I double-checked on Ubuntu 18 that tar -xvf ILSVRC2012_img_train.tar
does not produce a folder ILSVRC2012_img_train/
but found some typos in commands to process validation dataset instead.
So the initial commands should be fine for training dataset.
from torchdistill.
Hi @PotatoThanh
I just tried to reproduce the error, but example/image_classification.py
is running well on multiple GPUs with configs/sample/ilsvrc2012/single_stage/kd/alexnet_from_resnet152.yaml
so far.
Could you provide 1) OS info, 2) Python ver., and 3) torchdistill ver. as well?
Also, if you have made any change on code and/or yaml config file, please share them here too.
Thank you
from torchdistill.
I am using Ubuntu=20.04, TorchDistill=0.1.4, NvidiaDriver=450.102.04, Torch=1.7.1, Cuda=11.0, TorchVision=0.8.2.
I did not modify anything from your code as well as yaml files. I am trying to reproduce your results on ImageNet.
Thank you!
from torchdistill.
@PotatoThanh
And which python version are you using? Your provided environment is more or less the same with mine, so it should be fine as long as you're using Python 3.6 - 3.8 and you follow this instruction for ImageNet dataset
Besides, if you'd like to reproduce the results reported in my paper, please follow the instructions under configs/official/
As noted here, all the config files under configs/sample/
are not tuned, but used mostly for debugging purpose.
from torchdistill.
Thank you @yoshitomo-matsubara,
Yes, I am using Python 3.8.5 as well as your instructions for ImageNet. I ran yaml file in configs/sample/
. Let me try configs/official/
and see
from torchdistill.
Thank you for providing the info @PotatoThanh
I'm assuming you're using the latest version in this repo (currently 627abd5) for image_classification.py
.
If you still face the same error, please make sure that your ImageNet folder contains 1000 sub folders only as the following error message implies that sometimes targets
contains at least one class index that is out of range 0 - 999
/opt/conda/conda-bld/pytorch_1607370172916/work/aten/src/THCUNN/ClassNLLCriterion.cu:108: cunn_ClassNLLCriterion_updateOutput_kernel: block: [0,0,0], thread: [25,0,0] Assertion t >= 0 && t < n_classes failed.
from torchdistill.
Thank you @yoshitomo-matsubara,
I found the problem. When I preprocess the ImageNet using
mkdir ./resource/dataset/ilsvrc2012/{train,val} -p
mv ILSVRC2012_img_train.tar ./resource/dataset/ilsvrc2012/train/
cd ./resource/dataset/ilsvrc2012/train/
tar -xvf ILSVRC2012_img_train.tar
for f in *.tar; do
d=basename $f .tar
mkdir $d
(cd $d && tar xf ../$f)
done
rm -r *.tar
There is a folder name ILSVRC2012_img_train
under ./resource/dataset/ilsvrc2012/train/
. Therefore, when the code loads data, it will raise error.
from torchdistill.
Related Issues (20)
- It seems some bug in `split_dataset` HOT 1
- Distilling Knowledge from a image classification model with sigmoid function and binary cross entropy HOT 3
- Bug. Bad implement. HOT 2
- Combine two distillation losses HOT 9
- Similarity Preserving KD HOT 2
- How to train my own COCO dataset for object detection? HOT 1
- Why using `log_softmax` instead of `softmax`? HOT 1
- ValueError: batchmean is not a valid value for reduction HOT 1
- Disagreement betweeen the log and configuration of kd-resnet18_from_resnet34 HOT 1
- Use different models as Teacher/Student HOT 1
- Custom Data HOT 1
- Where is trained model? HOT 1
- Not a bug but a discrepency between the log and config file for kd-resnet18_from_resnet34 HOT 1
- How should I use Torchdistill? HOT 1
- [BUG] Not supported to Nvidia 4090 HOT 1
- I tried with this script also, only single nproc seems to be working. Do i need to define any additional enviornment variables like RANK or LocaL HOST HOT 1
- [BUG] fp16 causes AssertionError: No inf checks were recorded for this optimizer HOT 4
- [BUG] Missing Link in Readme HOT 1
- [BUG]ImportError: cannot import name 'import_dependencies' from 'torchdistill.common.main_util' HOT 2
- is tochdistill support knowlede distillation for Vision Foundation Models like Grounding Dino / Grounding DinoSAM ? HOT 1
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 torchdistill.