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

Error when uses transfer_learning.train #15

Closed
daimianw opened this issue Apr 19, 2023 · 2 comments
Closed

Error when uses transfer_learning.train #15

daimianw opened this issue Apr 19, 2023 · 2 comments

Comments

@daimianw
Copy link

Thanks for the interesting project! I am trying to apply the project on a smaller chess board. When performing model fine tuning, I encountered the following error, for which I have not found a way around. Could you please help? The error message is below:

"
jetson@yahboom:~/chesscog$ python3.9 -m chesscog.transfer_learning.train
[2023-04-19 14:29:52,990] {train.py:43} INFO - Starting training for occupancy_classifier
[2023-04-19 14:29:53,164] {train.py:55} INFO - Starting training in /home/jetson/chesscog/runs/transfer_learning/occupancy_classifier
[2023-04-19 14:29:53,165] {train.py:61} WARNING - The folder /home/jetson/chesscog/runs/transfer_learning/occupancy_classifier already exists and will be overwritten by this run
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/jetson/chesscog/chesscog/transfer_learning/train.py", line 44, in
_train_model(model_type)
File "/home/jetson/chesscog/chesscog/transfer_learning/train.py", line 35, in _train_model
train_model(cfg, run_dir, model, is_inception,
File "/home/jetson/chesscog/chesscog/core/training/train.py", line 80, in train_model
dataset = build_dataset(cfg, Datasets.TRAIN)
File "/home/jetson/chesscog/chesscog/core/dataset/dataset.py", line 70, in build_dataset
dataset = torchvision.datasets.ImageFolder(root=URI(cfg.DATASET.PATH) / mode.value,
File "/home/jetson/.local/lib/python3.9/site-packages/torchvision/datasets/folder.py", line 310, in init
super(ImageFolder, self).init(root, loader, IMG_EXTENSIONS if is_valid_file is None else None,
File "/home/jetson/.local/lib/python3.9/site-packages/torchvision/datasets/folder.py", line 145, in init
classes, class_to_idx = self.find_classes(self.root)
File "/home/jetson/.local/lib/python3.9/site-packages/torchvision/datasets/folder.py", line 221, in find_classes
return find_classes(directory)
File "/home/jetson/.local/lib/python3.9/site-packages/torchvision/datasets/folder.py", line 42, in find_classes
raise FileNotFoundError(f"Couldn't find any class folder in {directory}.")
FileNotFoundError: Couldn't find any class folder in /home/jetson/chess_data/transfer_learning/occupancy/train.
"

@georg-wolflein
Copy link
Owner

georg-wolflein commented Apr 20, 2023

Could you try running python -m chesscog.transfer_learning.create_dataset and then run the training again? Also, check out the instructions in section C.2.6 here.

@daimianw
Copy link
Author

Yes. It unblocked the training. Thanks for the quick response!

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