TreB1eN / InsightFace_Pytorch

Pytorch0.4.1 codes for InsightFace
MIT License
1.74k stars 423 forks source link

FileNotFoundError: [Errno 2] No such file or directory: 'work_space/models/model_2020-03-02-23-33_accuracy:0.5048571428571429_step:11645_None.pth' #127

Open jongli747 opened 4 years ago

jongli747 commented 4 years ago

I have facing this error while train from scratch. anyone face this problem or can help to solve this?

None optimizers generated epoch 0 started 20%|███████████▊ | 11645/58227 [37:04<2:28:19, 5.23it/s]Traceback (most recent call last): File "train.py", line 32, in learner.train(conf, args.epochs) File "/home/jongli/Work/arcfacer2/InsightFace_Pytorch/Learner.py", line 220, in train self.save_state(conf, accuracy) File "/home/jongli/Work/arcfacer2/InsightFace_Pytorch/Learner.py", line 68, in savestate ('model{}_accuracy:{}step:{}{}.pth'.format(get_time(), accuracy, self.step, extra))) File "/home/jongli/anaconda3/envs/arc/lib/python3.6/site-packages/torch/serialization.py", line 209, in save return _with_file_like(f, "wb", lambda f: _save(obj, f, pickle_module, pickle_protocol)) File "/home/jongli/anaconda3/envs/arc/lib/python3.6/site-packages/torch/serialization.py", line 132, in _with_file_like f = open(f, mode) FileNotFoundError: [Errno 2] No such file or directory: 'work_space/models/model_2020-03-02-23-33_accuracy:0.5048571428571429_step:11645_None.pth'

LiuDongyang6 commented 4 years ago

I faced the same problem, and removing ':' fixed it. Windows does not allow ':' in filenames.

xszg007 commented 4 years ago

I also had the same problem on windows, but there was no problem on ubuntu with py3.7