Seanlinx / mtcnn

593 stars 264 forks source link

fail to open "model/pnet-symbol.json" #56

Open tianhuangli opened 6 years ago

tianhuangli commented 6 years ago

@Seanlinx hi,when i finished train P-net (executing train_P_net.py),The results are shown below. however ,there is no problem when i train the R-net and O-net...I carefully examined the parameters of the program,but still not find any problem. Do you know why this happens? thank you for reply!

result: INFO:root:Epoch[0] Train-Accuracy=0.998550 INFO:root:Epoch[0] Train-LogLoss=0.008678 INFO:root:Epoch[0] Train-BBOX_MSE=0.031688 INFO:root:Epoch[0] Time cost=583.256 [10:39:30] include/dmlc/logging.h:308: [10:39:30] src/io/local_filesys.cc:166: Check failed: allow_null LocalFileSystem: fail to open "model/pnet-symbol.json"

Stack trace returned 10 entries: [bt] (0) /home/cc/tianhuangshijie/mxnet/local/lib/python2.7/site-packages/mxnet-0.12.1-py2.7.egg/mxnet/libmxnet.so(_ZN4dmlc2io15LocalFileSystem4OpenERKNS0_3URIEPKcb+0x459) [0x7fd587df1d39] [bt] (1) /home/cc/tianhuangshijie/mxnet/local/lib/python2.7/site-packages/mxnet-0.12.1-py2.7.egg/mxnet/libmxnet.so(_ZN4dmlc6Stream6CreateEPKcS2_b+0x3a) [0x7fd587de85aa] [bt] (2) /home/cc/tianhuangshijie/mxnet/local/lib/python2.7/site-packages/mxnet-0.12.1-py2.7.egg/mxnet/libmxnet.so(MXSymbolSaveToFile+0x25) [0x7fd5878418b5] [bt] (3) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call_unix64+0x4c) [0x7fd590988c7c] [bt] (4) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call+0x1fc) [0x7fd5909885ac] [bt] (5) /home/cc/tianhuangshijie/mxnet/lib/python2.7/lib-dynload/_ctypes.x86_64-linux-gnu.so(_ctypes_callproc+0x48e) [0x7fd590b9f5fe] [bt] (6) /home/cc/tianhuangshijie/mxnet/lib/python2.7/lib-dynload/_ctypes.x86_64-linux-gnu.so(+0x15f9e) [0x7fd590ba0f9e] [bt] (7) python(PyEval_EvalFrameEx+0x965) [0x499be5] [bt] (8) python(PyEval_EvalCodeEx+0x2ac) [0x4a090c] [bt] (9) python(PyEval_EvalFrameEx+0x18c5) [0x49ab45]

Traceback (most recent call last): File "train_P_net.py", line 54, in args.begin_epoch, args.end_epoch, args.frequent, args.lr, args.resume) File "train_P_net.py", line 16, in train_P_net 12, frequent, not resume, lr) File "/home/lith/mtcnn/train.py", line 84, in train_net arg_params=args, aux_params=auxs, begin_epoch=begin_epoch, num_epoch=end_epoch) File "/home/cc/tianhuangshijie/mxnet/local/lib/python2.7/site-packages/mxnet-0.12.1-py2.7.egg/mxnet/module/base_module.py", line 521, in fit callback(epoch, self.symbol, arg_params, aux_params) File "/home/cc/tianhuangshijie/mxnet/local/lib/python2.7/site-packages/mxnet-0.12.1-py2.7.egg/mxnet/callback.py", line 89, in _callback save_checkpoint(prefix, iter_no + 1, sym, arg, aux) File "/home/cc/tianhuangshijie/mxnet/local/lib/python2.7/site-packages/mxnet-0.12.1-py2.7.egg/mxnet/model.py", line 387, in save_checkpoint symbol.save('%s-symbol.json' % prefix) File "/home/cc/tianhuangshijie/mxnet/local/lib/python2.7/site-packages/mxnet-0.12.1-py2.7.egg/mxnet/symbol/symbol.py", line 1185, in save check_call(_LIB.MXSymbolSaveToFile(self.handle, c_str(fname))) File "/home/cc/tianhuangshijie/mxnet/local/lib/python2.7/site-packages/mxnet-0.12.1-py2.7.egg/mxnet/base.py", line 146, in check_call raise MXNetError(py_str(_LIB.MXGetLastError())) mxnet.base.MXNetError: [10:39:30] src/io/local_filesys.cc:166: Check failed: allow_null LocalFileSystem: fail to open "model/pnet-symbol.json"

Stack trace returned 10 entries: [bt] (0) /home/cc/tianhuangshijie/mxnet/local/lib/python2.7/site-packages/mxnet-0.12.1-py2.7.egg/mxnet/libmxnet.so(_ZN4dmlc2io15LocalFileSystem4OpenERKNS0_3URIEPKcb+0x459) [0x7fd587df1d39] [bt] (1) /home/cc/tianhuangshijie/mxnet/local/lib/python2.7/site-packages/mxnet-0.12.1-py2.7.egg/mxnet/libmxnet.so(_ZN4dmlc6Stream6CreateEPKcS2_b+0x3a) [0x7fd587de85aa] [bt] (2) /home/cc/tianhuangshijie/mxnet/local/lib/python2.7/site-packages/mxnet-0.12.1-py2.7.egg/mxnet/libmxnet.so(MXSymbolSaveToFile+0x25) [0x7fd5878418b5] [bt] (3) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call_unix64+0x4c) [0x7fd590988c7c] [bt] (4) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call+0x1fc) [0x7fd5909885ac] [bt] (5) /home/cc/tianhuangshijie/mxnet/lib/python2.7/lib-dynload/_ctypes.x86_64-linux-gnu.so(_ctypes_callproc+0x48e) [0x7fd590b9f5fe] [bt] (6) /home/cc/tianhuangshijie/mxnet/lib/python2.7/lib-dynload/_ctypes.x86_64-linux-gnu.so(+0x15f9e) [0x7fd590ba0f9e] [bt] (7) python(PyEval_EvalFrameEx+0x965) [0x499be5] [bt] (8) python(PyEval_EvalCodeEx+0x2ac) [0x4a090c] [bt] (9) python(PyEval_EvalFrameEx+0x18c5) [0x49ab45]

tianhuangli commented 6 years ago

When I was training the third time, there was no error...==

beyondpzk commented 6 years ago

I also met this problem, can you tell me how to fix it? thanks!

beyondpzk commented 6 years ago

I have tried several times, but it always exists.

AaronYoooooooog commented 6 years ago

mkdir model