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

Training will ony run over 3 steps #19

Open
CodingArcher opened this issue May 19, 2020 · 6 comments
Open

Training will ony run over 3 steps #19

CodingArcher opened this issue May 19, 2020 · 6 comments

Comments

@CodingArcher
Copy link

Hi,
i have tried to run your code but for some reason when training in Train.py line 70 it will only run for 3 steps and then finish. this seems a bit odd as i would have assuemed it would run over all the images?!

hope for quick feedback :)

@koyeongmin
Copy link
Owner

Line 70 of Train.py seem data loader. If your dataset structure is different to README file, some errors will occur from data loader. Could you show your error message?

@CodingArcher
Copy link
Author

this is what i have changed in the parameters.py file:

class Parameters():
    save_path = "data/savefile/"
    model_path = ""
    train_root_url="data/dataset/train_set/"
    test_root_url="data/dataset/test_set/"

in the data_loader.py file i have changed the location to:

with open("data/dataset/five.json") as f:

the structure of the data folder is see the attached file.

i hope you can guide me to fixing this :)
tree.txt

@koyeongmin
Copy link
Owner

It looks fine. If you show me your error message, debugging will be more clear

@CodingArcher
Copy link
Author

File "main.py", line 81, in Train
lane_agent.save_model(int(step/100), loss_p)
File "/root/handler.py", line 312, in save_model
self.p.save_path + str(epoch) + '' + str(loss) + '' + 'lane_detection_network.pkl'
File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 369, in save
with _open_file_like(f, 'wb') as opened_file:
File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 234, in _open_file_like
return _open_file(name_or_buffer, mode)
File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 215, in init
super(_open_file, self).init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'savefile/0_tensor(5.8034)_lane_detection_network.pkl'

@CodingArcher
Copy link
Author

i am currently using python3.7

@koyeongmin
Copy link
Owner

It looks like path problem. Try to set the path to absolute path

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