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

NameError: name 'config' is not defined on prepare_data.py #5

Open
reillydonovan opened this issue Feb 21, 2022 · 3 comments
Open

NameError: name 'config' is not defined on prepare_data.py #5

reillydonovan opened this issue Feb 21, 2022 · 3 comments

Comments

@reillydonovan
Copy link

Howdy, when I enter the following command I am returned an error, listed below:

python prepare_data.py ./configs/dataset/flickr-landscape-small.yaml --train_only

Traceback (most recent call last):
File "prepare_data.py", line 200, in
cur_lmdb_root = config.data_params.lmdb_root
NameError: name 'config' is not defined

I'm not sure what the issue is here. Any sugestions?

@hubert0527
Copy link
Owner

Thanks for reporting, it should be args.config, I'll update the codes later.
Meanwhile, it is recommended to set LMDB_ROOTS in env_config.py.

@reillydonovan
Copy link
Author

Okay, I've done that, now I'm getting the following error:

File "prepare_data.py", line 227, in
assert len(img_paths) >= config.data_params.num_train + config.data_params.num_valid,
AssertionError: 50000 train and 50000 valid, sum up 100000 samples is more than dataset with 2 samples

I have data.mdb and lock.mdb for the flicker-landscape-small downloaded and in the target directory- am I supposed to unpack this? If so how? Thank you so much for your help, I look forward to generating some infinity landscapes!

@hubert0527
Copy link
Owner

You can directly go for training if you download our lmdb file.
The prepare_data.py was meant to build lmdb from an image folder, which is useful when you want to train with your own dataset.

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

2 participants