Skip to content

no definition of 'val_files' in the data_processing.py #31

@despairisa

Description

@despairisa

I have used python to run the preprocessing file: data_processing.py, which is in the CUB folder. But it fails in a strange issue, below is the code and error message.

Code:

python3 data_processing.py -data_dir datasets/CUB_200_2011 -save_dir CUB_processed

Error:

Number of train images from official train test split: 5994
Traceback (most recent call last):
File "/home/chiayilai/Desktop/ConceptBottleneck-master/CUB/data_processing.py", line 85, in
train_data, val_data, test_data = extract_data(args.data_dir)
File "/home/chiayilai/Desktop/ConceptBottleneck-master/CUB/data_processing.py", line 64, in extract_data
if val_files is not None:
NameError: name 'val_files' is not defined

The strange thing is that I can’t find the definition of “val_files” in the data_processing.py. And I can’t find any keywords related to it in the readme file. I tried to add a new folder named “val_files”, but it was still no use. Then I altered the “val_files” to “val_data”. It successfully produced three .pkl files, but I don’t know if this way is correct or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions