Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
marsggbo opened this issue Sep 26, 2018 · 5 comments
Open

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

marsggbo opened this issue Sep 26, 2018 · 5 comments

Comments

@marsggbo
Copy link

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'

@favorxin
Copy link

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

@zmsunnyday
Copy link

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

@ZTao-z
Copy link

ZTao-z commented Jun 16, 2019

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':

@kukby
Copy link

kukby commented Mar 3, 2020

@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?

@SuperRui41
Copy link

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants