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

train problem #6

Open
JiangDing1995 opened this issue Nov 12, 2019 · 2 comments
Open

train problem #6

JiangDing1995 opened this issue Nov 12, 2019 · 2 comments

Comments

@JiangDing1995
Copy link

When i run 'python train.py' to 50%, here is the error:
loading annotations into memory...
Done (t=4.52s)
creating index...
index created!
loading annotations into memory...
Done (t=0.53s)
creating index...
index created!
train images: 64115
val images: 2693
50%|████████████████▉ | 8014/16029 [3:14:17<3:02:36, 1.37s/it]Traceback (most recent call last):
File "train.py", line 16, in
openpose.train()
File "/home/robeon/Pytorch0.4.1_Openpose-master/openpose.py", line 283, in train
self.save_state(val_loss)
File "/home/robeon/Pytorch0.4.1_Openpose-master/openpose.py", line 101, in save_state
('model_{}_val_loss:{}_step:{}.pth'.format(time, val_loss, self.step)))
File "/home/robeon/anaconda3/lib/python3.6/site-packages/torch/serialization.py", line 224, in save
return _with_file_like(f, "wb", lambda f: _save(obj, f, pickle_module, pickle_protocol))
File "/home/robeon/anaconda3/lib/python3.6/site-packages/torch/serialization.py", line 147, in _with_file_like
f = open(f, mode)
FileNotFoundError: [Errno 2] No such file or directory: 'work_space/save/model_2019-11-12-12-39_val_loss:0.022055972758680584_step:8014.pth'

before 50% is ok,but why need this '.pth' file? anyone help?

@Johnren1111
Copy link

I have the same problem! anyone help?

@WinstonDeng
Copy link

@JiangDing1995 @Johnren1111

  1. create a new file named "model" in work_space,
  2. modify all code about file path, such as:

params['work_space']/'save' ->

os.path.join(params['work_space'],'save')

save_path / ('model_{}_val_loss:{}_step:{}.pth'.format(time, val_loss, self.step) ->

os.path.join(save_path,'model_{}val_loss{}step{}.pth'.format(time, val_loss, self.step)

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

3 participants