szagoruyko / attention-transfer

Improving Convolutional Networks via Attention Transfer (ICLR 2017)
https://arxiv.org/abs/1612.03928
1.43k stars 274 forks source link

Question on Code #8

Closed zhenxing1992 closed 7 years ago

zhenxing1992 commented 7 years ago

thank you for your code , it's very helpful for me to study computer vision. but it is shame that i can't run this code correctly, i think it's maybe the matter of the edition of software so, there is a issue i want to know that the edition of software, such us python, opencv, what i used is python 2.7 pencv 3.2.0

thank you very much

szagoruyko commented 7 years ago

what's the error you get? I used python 2.7 and opencv 3.2, right

zhenxing1992 commented 7 years ago

When I run code 'python cifar.py --save logs/resnet_40_1_teacher --depth 40 --width 1', there is a error that from torchvision import cvtransforms, that means i can't import name cvtransforms. Should I change the import part 'from torchvision import cvtransforms' to 'from torchvision import transforms as cvtransforms'?

szagoruyko commented 7 years ago

@zhenxing1992 please follow the installation instructions in README, you need to install torchvision from my fork, it has cvtransforms.

zhenxing1992 commented 7 years ago

thank you very much . i will train again immediately.

szagoruyko commented 7 years ago

I just merged #9, so that it works with vanilla pytorch and torchvision.

zhenxing1992 commented 7 years ago

i made it , thank you very much.