InsightFace_Pytorch icon indicating copy to clipboard operation
InsightFace_Pytorch copied to clipboard

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

Open jongli747 opened this issue 5 years ago • 2 comments

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 save_state ('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'

jongli747 avatar Mar 02 '20 18:03 jongli747

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

LiuDongyang6 avatar Apr 22 '20 01:04 LiuDongyang6

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

xszg007 avatar Jul 16 '20 02:07 xszg007