ENAS-pytorch icon indicating copy to clipboard operation
ENAS-pytorch copied to clipboard

AttributeError: 'str' object has no attribute 'datset'

Open marsggbo opened this issue 7 years ago • 5 comments

Traceback (most recent call last): File "main.py", line 48, in main(args) File "main.py", line 26, in main dataset = data.image.Image(args.data_path) File "/home/comp/csxinhe/Code/ENAS-pytorch/data/image.py", line 8, in init if args.datset == 'cifar10': AttributeError: 'str' object has no attribute 'datset'

marsggbo avatar Sep 26 '18 09:09 marsggbo

@marsggbo Do you handle this problem? I met it, too.

favorxin avatar May 21 '19 05:05 favorxin

I think this is a bug. I fixed it by remove all the if-else in data.image.Image.init, and the code run normally

zmsunnyday avatar May 21 '19 11:05 zmsunnyday

I fixed it by change the value of the function parameter

(1) File "main.py", line 26 dataset = data.image.Image(args.data_path) change into: dataset = data.image.Image(args)

(2)File "/data/image.py", line 8 if args.dataset == 'cifar10': change into: if args.dataset == 'cifar':

ZTao-z avatar Jun 16 '19 17:06 ZTao-z

@ZTao-z I try this method. But when i change dataset = data.image.Image(args.data_path) into dataset = data.image.Image(args). I meet a problem AttributeError: 'Namespace' object has no attribute 'num_workers' Do you have meet this problem when you change the value?

kukby avatar Mar 03 '20 13:03 kukby

@ZTao-z I try this method. But when i change dataset = data.image.Image(args.data_path) into dataset = data.image.Image(args). I meet a problem AttributeError: 'Namespace' object has no attribute 'num_workers' Do you have meet this problem when you change the value?

My situation is the same as yours. How did you solve this problem in the end?

SuperRui41 avatar Apr 29 '21 03:04 SuperRui41