zhanghang1989 / PyTorch-Encoding

A CV toolkit for my papers.
https://hangzhang.org/PyTorch-Encoding/
MIT License
2.04k stars 450 forks source link

TypeError: __init__() got an unexpected keyword argument 'train' #244

Closed a0988731275 closed 4 years ago

a0988731275 commented 4 years ago

Dear all,

I have followed the guideline as the following website (https://hangzhang.org/PyTorch-Encoding/experiments/texture.html) which I have done the following step

  1. pip install torch==1.0.0 torchvision==0.2.1 (For Installing pytorch 1.0.0 version and torchvision 0.2.1 version)
  2. pip install torch-encoding (For installing torch-encoding 1.01 version)
  3. git clone https://github.com/zhanghang1989/PyTorch-Encoding && cd PyTorch-Encoding
  4. python setup.py install (For setting up all of them)
  5. python scripts/prepare_minc.py (For installing minc dataset)
  6. python main.py --dataset minc --model deepten_resnet50_minc --nclass 23 --pretrained --eval (For evaluation the result)

However I have got the following error

Namespace(backbone='resnet50', batch_size=128, checkname='default', cuda=True, dataset='minc', epochs=600, eval=True, lr=0.1, lr_scheduler='cos', lr_step=40, model='deepten_resnet50_minc', momentum=0.9, nclass=23, ncodes=32, no_cuda=False, plot=False, pretrained=True, resume=None, seed=1, start_epoch=1, test_batch_size=256, weight_decay=0.0001, widen=4, workers=16)
Traceback (most recent call last):
  File "main.py", line 181, in <module>
    main()
  File "main.py", line 38, in main
    transform=transform_train, train=True, download=True)
  File "/home/pingrui/Desktop/Deepten/lib/python3.6/site-packages/encoding/datasets/__init__.py", line 39, in get_dataset
    return datasets [name.lower()] (**kwargs)
TypeError: __init__() got an unexpected keyword argument 'train'

I am really confused on where I have done wrong since I have tried it for a long time. If anyone can help me solve this problem, I'll be really thankful for your help.

Note: My GPU is 1080ti, the version of cuda is 10.0, my system is ubuntu 18.04, the version of my python is 3.6

zhanghang1989 commented 4 years ago

Thanks for reporting. Sorry that I am not maintaining the repo anymore.

a0988731275 commented 4 years ago

Thanks for reporting. Sorry that I am not maintaining the repo anymore.

Dear zhanghang,

Thanks for your early reply. Since your research "Deep TEN: Texture Encoding Network" interests my lab and I a lot, we expect ourselves can run this code successfully. However, as mentioned above, the code due to some reasons can't be ran. And if any clue from your memory can provide to us, like

a. which step we can adjust or change or add so that the code may have chance to be ran (For example I may have wrong pytorch version, I may have wrong torch-encoding version, I may have wrong gitversion of pytorch-encoding, I may wrong cuda version or I didn't install something and so on) b. As your experience, which version of ubuntu system and which version of python and which version of torch-encoding and others should be installed so that the code can run. (i.e. which combination can make the code run)

, We will be thankful for your nice help.

roseif commented 4 years ago

I also encountered the same problem as you. I'm very interested in this code, but it didn't run for several days, I hope the author can give some hints to solve it. Thank you very much