iliasprc / COVIDNet

PyTorch implementation of COVID-Net https://github.com/lindawangg/COVID-Net
GNU General Public License v3.0
80 stars 19 forks source link

Attribute Error While Running #9

Closed 6sz closed 4 years ago

6sz commented 4 years ago

Thanks for your effort. When I tried to run the code I got the following error, How can I handle it?

Traceback (most recent call last): File "main.py", line 72, in main() File "main.py", line 21, in main model, optimizer, training_generator, val_generator, test_generator = initialize(args) File "/home/lsz/Documents/study/COVID/COVIDNet-master/trainer/train.py", line 33, in initialize train_loader = COVIDxDataset(mode='train', n_classes=args.classes, dataset_path=args.data, AttributeError: 'Namespace' object has no attribute 'data'

hendrikTpl commented 4 years ago

if I am not mistaken, this error occurs due to the path for the dataset does not correct. you might try to verify it. in my case, I try to replace if args.dataset_name == 'COVIDx': instead of if args.dataset == 'COVIDx': since in main.py args throw 'dataset_name' not 'dataset'.

iliasprc commented 4 years ago

Yes @hendrikTpl the argument was False, I replaced it to dataset_name