oyxhust / CNN-LSTM-CTC-text-recognition

CNN and LSTM model for text recognition
259 stars 88 forks source link

DeprecationWarning: mxnet.model.FeedForward has been deprecated. Please use mxnet.mod.Module instead. #9

Closed xiaohujecky closed 7 years ago

xiaohujecky commented 7 years ago

Is the new version of mxnet changed the functions? python train_bi_lstm.py train_bi_lstm.py:204: DeprecationWarning: mxnet.model.FeedForward has been deprecated. Please use mxnet.mod.Module instead. initializer=mx.init.Xavier(factor_type="in", magnitude=2.34)) INFO:root:begin fit /usr/local/lib/python2.7/dist-packages/mxnet-0.10.1-py2.7.egg/mxnet/model.py:530: DeprecationWarning: Calling initializer with init(str, NDArray) has been deprecated.please use init(mx.init.InitDesc(...), NDArray) instead. self.initializer(k, v) INFO:root:Start training with [gpu(0)] [17:51:56] src/c_api/c_api_ndarray.cc:133: GPU support is disabled. Compile MXNet with USE_CUDA=1 to enable GPU support. [17:51:56] /disk/data/mxnet/dmlc-core/include/dmlc/logging.h:304: [17:51:56] src/c_api/c_api_ndarray.cc:390: Operator _zeros is not implemented for GPU.

Stack trace returned 10 entries: [bt] (0) /usr/local/lib/python2.7/dist-packages/mxnet-0.10.1-py2.7.egg/mxnet/libmxnet.so(_ZN4dmlc15LogMessageFatalD1Ev+0x3c) [0x7f45d3c4b55c] [bt] (1) /usr/local/lib/python2.7/dist-packages/mxnet-0.10.1-py2.7.egg/mxnet/libmxnet.so(_Z20ImperativeInvokeImplRKN5mxnet7ContextERKN4nnvm9NodeAttrsEPSt6vectorINS_7NDArrayESaIS8EESB+0x9ac) [0x7f45d4915d8c] [bt] (2) /usr/local/lib/python2.7/dist-packages/mxnet-0.10.1-py2.7.egg/mxnet/libmxnet.so(MXImperativeInvoke+0x254) [0x7f45d49162a4] [bt] (3) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call_unix64+0x4c) [0x7f45d713fadc] [bt] (4) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call+0x1fc) [0x7f45d713f40c] [bt] (5) /data/tensorflow/lib/python2.7/lib-dynload/_ctypes.x86_64-linux-gnu.so(_ctypes_callproc+0x48e) [0x7f45d73565fe] [bt] (6) /data/tensorflow/lib/python2.7/lib-dynload/_ctypes.x86_64-linux-gnu.so(+0x15f9e) [0x7f45d7357f9e] [bt] (7) python(PyEval_EvalFrameEx+0x98d) [0x5244dd] [bt] (8) python(PyEval_EvalCodeEx+0x2b1) [0x555551] [bt] (9) python(PyEval_EvalFrameEx+0x1a10) [0x525560]

Traceback (most recent call last): File "train_bi_lstm.py", line 222, in epoch_end_callback = mx.callback.do_checkpoint(prefix, 1)) File "/usr/local/lib/python2.7/dist-packages/mxnet-0.10.1-py2.7.egg/mxnet/model.py", line 830, in fit sym_gen=self.sym_gen) File "/usr/local/lib/python2.7/dist-packages/mxnet-0.10.1-py2.7.egg/mxnet/model.py", line 210, in _train_multi_device logger=logger) File "/usr/local/lib/python2.7/dist-packages/mxnet-0.10.1-py2.7.egg/mxnet/executor_manager.py", line 326, in init self.slices, train_data) File "/usr/local/lib/python2.7/dist-packages/mxnet-0.10.1-py2.7.egg/mxnet/executor_manager.py", line 238, in init input_types=data_types) File "/usr/local/lib/python2.7/dist-packages/mxnet-0.10.1-py2.7.egg/mxnet/executor_manager.py", line 152, in _bind_exec arg_arr = nd.zeros(arg_shape[i], ctx, dtype=arg_types[i]) File "/usr/local/lib/python2.7/dist-packages/mxnet-0.10.1-py2.7.egg/mxnet/ndarray.py", line 1047, in zeros return _internal._zeros(shape=shape, ctx=ctx, dtype=dtype, **kwargs) File "", line 15, in _zeros File "/usr/local/lib/python2.7/dist-packages/mxnet-0.10.1-py2.7.egg/mxnet/_ctypes/ndarray.py", line 72, in _imperative_invoke c_array(ctypes.c_char_p, [c_str(str(val)) for val in vals]))) File "/usr/local/lib/python2.7/dist-packages/mxnet-0.10.1-py2.7.egg/mxnet/base.py", line 85, in check_call raise MXNetError(py_str(_LIB.MXGetLastError())) mxnet.base.MXNetError: [17:51:56] src/c_api/c_api_ndarray.cc:390: Operator _zeros is not implemented for GPU.

Stack trace returned 10 entries: [bt] (0) /usr/local/lib/python2.7/dist-packages/mxnet-0.10.1-py2.7.egg/mxnet/libmxnet.so(_ZN4dmlc15LogMessageFatalD1Ev+0x3c) [0x7f45d3c4b55c] [bt] (1) /usr/local/lib/python2.7/dist-packages/mxnet-0.10.1-py2.7.egg/mxnet/libmxnet.so(_Z20ImperativeInvokeImplRKN5mxnet7ContextERKN4nnvm9NodeAttrsEPSt6vectorINS_7NDArrayESaIS8EESB+0x9ac) [0x7f45d4915d8c] [bt] (2) /usr/local/lib/python2.7/dist-packages/mxnet-0.10.1-py2.7.egg/mxnet/libmxnet.so(MXImperativeInvoke+0x254) [0x7f45d49162a4] [bt] (3) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call_unix64+0x4c) [0x7f45d713fadc] [bt] (4) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call+0x1fc) [0x7f45d713f40c] [bt] (5) /data/tensorflow/lib/python2.7/lib-dynload/_ctypes.x86_64-linux-gnu.so(_ctypes_callproc+0x48e) [0x7f45d73565fe] [bt] (6) /data/tensorflow/lib/python2.7/lib-dynload/_ctypes.x86_64-linux-gnu.so(+0x15f9e) [0x7f45d7357f9e] [bt] (7) python(PyEval_EvalFrameEx+0x98d) [0x5244dd] [bt] (8) python(PyEval_EvalCodeEx+0x2b1) [0x555551] [bt] (9) python(PyEval_EvalFrameEx+0x1a10) [0x525560]

oyxhust commented 7 years ago

Yes, it is because you use the latest version of Mxnet. My mxnet version is 0.7.0 and warp-ctc is this version (https://github.com/baidu-research/warp-ctc/tree/5bfb46e83bcb338a09fbf875cb0b02bc39746b36). I have put my mxnet and warpctc on baiduyun, you can download from this link (http://pan.baidu.com/s/1dEDgPiD).