You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
请问一下,这个错误怎么解决?是我的mxnet没有安装好吗?第一次用mxnet,查资料也没解决,请大神帮忙。谢谢。
Traceback (most recent call last):
File "/home/cy/pycharm-community-2019.1/helpers/pydev/pydevd.py", line 1741, in
main()
File "/home/cy/pycharm-community-2019.1/helpers/pydev/pydevd.py", line 1735, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "/home/cy/pycharm-community-2019.1/helpers/pydev/pydevd.py", line 1135, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/home/cy/pycharm-community-2019.1/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/home/cy/PycharmProjects/ResidualAttentionNetwork-master/train_cifar.py", line 160, in
net.initialize(init=mx.init.MSRAPrelu(), ctx=ctx) #ctx=1
File "/home/cy/anaconda3/envs/mxnet/lib/python3.5/site-packages/mxnet/gluon/block.py", line 502, in initialize
self.collect_params().initialize(init, ctx, verbose, force_reinit)
File "/home/cy/anaconda3/envs/mxnet/lib/python3.5/site-packages/mxnet/gluon/parameter.py", line 813, in initialize
v.initialize(None, ctx, init, force_reinit=force_reinit)
File "/home/cy/anaconda3/envs/mxnet/lib/python3.5/site-packages/mxnet/gluon/parameter.py", line 391, in initialize
self._finish_deferred_init()
File "/home/cy/anaconda3/envs/mxnet/lib/python3.5/site-packages/mxnet/gluon/parameter.py", line 285, in _finish_deferred_init
self._init_impl(data, ctx)
File "/home/cy/anaconda3/envs/mxnet/lib/python3.5/site-packages/mxnet/gluon/parameter.py", line 297, in _init_impl
self._data = [data.copyto(ctx) for ctx in self._ctx_list]
File "/home/cy/anaconda3/envs/mxnet/lib/python3.5/site-packages/mxnet/gluon/parameter.py", line 297, in
self._data = [data.copyto(ctx) for ctx in self._ctx_list]
File "/home/cy/anaconda3/envs/mxnet/lib/python3.5/site-packages/mxnet/ndarray/ndarray.py", line 2077, in copyto
return _internal._copyto(self, out=hret)
File "", line 25, in _copyto
File "/home/cy/anaconda3/envs/mxnet/lib/python3.5/site-packages/mxnet/_ctypes/ndarray.py", line 92, in _imperative_invoke
ctypes.byref(out_stypes)))
File "/home/cy/anaconda3/envs/mxnet/lib/python3.5/site-packages/mxnet/base.py", line 252, in check_call
raise MXNetError(py_str(_LIB.MXGetLastError()))
mxnet.base.MXNetError: [11:06:56] src/ndarray/ndarray.cc:1279: GPU is not enabled
请问一下,这个错误怎么解决?是我的mxnet没有安装好吗?第一次用mxnet,查资料也没解决,请大神帮忙。谢谢。
Traceback (most recent call last):
File "/home/cy/pycharm-community-2019.1/helpers/pydev/pydevd.py", line 1741, in
main()
File "/home/cy/pycharm-community-2019.1/helpers/pydev/pydevd.py", line 1735, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "/home/cy/pycharm-community-2019.1/helpers/pydev/pydevd.py", line 1135, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/home/cy/pycharm-community-2019.1/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/home/cy/PycharmProjects/ResidualAttentionNetwork-master/train_cifar.py", line 160, in
net.initialize(init=mx.init.MSRAPrelu(), ctx=ctx) #ctx=1
File "/home/cy/anaconda3/envs/mxnet/lib/python3.5/site-packages/mxnet/gluon/block.py", line 502, in initialize
self.collect_params().initialize(init, ctx, verbose, force_reinit)
File "/home/cy/anaconda3/envs/mxnet/lib/python3.5/site-packages/mxnet/gluon/parameter.py", line 813, in initialize
v.initialize(None, ctx, init, force_reinit=force_reinit)
File "/home/cy/anaconda3/envs/mxnet/lib/python3.5/site-packages/mxnet/gluon/parameter.py", line 391, in initialize
self._finish_deferred_init()
File "/home/cy/anaconda3/envs/mxnet/lib/python3.5/site-packages/mxnet/gluon/parameter.py", line 285, in _finish_deferred_init
self._init_impl(data, ctx)
File "/home/cy/anaconda3/envs/mxnet/lib/python3.5/site-packages/mxnet/gluon/parameter.py", line 297, in _init_impl
self._data = [data.copyto(ctx) for ctx in self._ctx_list]
File "/home/cy/anaconda3/envs/mxnet/lib/python3.5/site-packages/mxnet/gluon/parameter.py", line 297, in
self._data = [data.copyto(ctx) for ctx in self._ctx_list]
File "/home/cy/anaconda3/envs/mxnet/lib/python3.5/site-packages/mxnet/ndarray/ndarray.py", line 2077, in copyto
return _internal._copyto(self, out=hret)
File "", line 25, in _copyto
File "/home/cy/anaconda3/envs/mxnet/lib/python3.5/site-packages/mxnet/_ctypes/ndarray.py", line 92, in _imperative_invoke
ctypes.byref(out_stypes)))
File "/home/cy/anaconda3/envs/mxnet/lib/python3.5/site-packages/mxnet/base.py", line 252, in check_call
raise MXNetError(py_str(_LIB.MXGetLastError()))
mxnet.base.MXNetError: [11:06:56] src/ndarray/ndarray.cc:1279: GPU is not enabled
Stack trace returned 10 entries:
[bt] (0) /home/cy/anaconda3/envs/mxnet/lib/python3.5/site-packages/mxnet/libmxnet.so(+0x21d8d4) [0x7fd8e83998d4]
[bt] (1) /home/cy/anaconda3/envs/mxnet/lib/python3.5/site-packages/mxnet/libmxnet.so(+0x21dcb1) [0x7fd8e8399cb1]
[bt] (2) /home/cy/anaconda3/envs/mxnet/lib/python3.5/site-packages/mxnet/libmxnet.so(mxnet::CopyFromTo(mxnet::NDArray const&, mxnet::NDArray const&, int, bool)+0x723) [0x7fd8eaec6f23]
[bt] (3) /home/cy/anaconda3/envs/mxnet/lib/python3.5/site-packages/mxnet/libmxnet.so(mxnet::imperative::PushFComputeEx(std::function<void (nnvm::NodeAttrs const&, mxnet::OpContext const&, std::vector<mxnet::NDArray, std::allocatormxnet::NDArray > const&, std::vector<mxnet::OpReqType, std::allocatormxnet::OpReqType > const&, std::vector<mxnet::NDArray, std::allocatormxnet::NDArray > const&)> const&, nnvm::Op const*, nnvm::NodeAttrs const&, mxnet::Context const&, std::vector<mxnet::engine::Var*, std::allocatormxnet::engine::Var* > const&, std::vector<mxnet::engine::Var*, std::allocatormxnet::engine::Var* > const&, std::vector<mxnet::Resource, std::allocatormxnet::Resource > const&, std::vector<mxnet::NDArray*, std::allocatormxnet::NDArray* > const&, std::vector<mxnet::NDArray*, std::allocatormxnet::NDArray* > const&, std::vector<mxnet::OpReqType, std::allocatormxnet::OpReqType > const&)::{lambda(mxnet::RunContext)#1}::operator()(mxnet::RunContext) const+0x110) [0x7fd8ead6d8c0]
[bt] (4) /home/cy/anaconda3/envs/mxnet/lib/python3.5/site-packages/mxnet/libmxnet.so(mxnet::imperative::PushFComputeEx(std::function<void (nnvm::NodeAttrs const&, mxnet::OpContext const&, std::vector<mxnet::NDArray, std::allocatormxnet::NDArray > const&, std::vector<mxnet::OpReqType, std::allocatormxnet::OpReqType > const&, std::vector<mxnet::NDArray, std::allocatormxnet::NDArray > const&)> const&, nnvm::Op const*, nnvm::NodeAttrs const&, mxnet::Context const&, std::vector<mxnet::engine::Var*, std::allocatormxnet::engine::Var* > const&, std::vector<mxnet::engine::Var*, std::allocatormxnet::engine::Var* > const&, std::vector<mxnet::Resource, std::allocatormxnet::Resource > const&, std::vector<mxnet::NDArray*, std::allocatormxnet::NDArray* > const&, std::vector<mxnet::NDArray*, std::allocatormxnet::NDArray* > const&, std::vector<mxnet::OpReqType, std::allocatormxnet::OpReqType > const&)+0x3ca) [0x7fd8ead78b7a]
[bt] (5) /home/cy/anaconda3/envs/mxnet/lib/python3.5/site-packages/mxnet/libmxnet.so(mxnet::Imperative::InvokeOp(mxnet::Context const&, nnvm::NodeAttrs const&, std::vector<mxnet::NDArray*, std::allocatormxnet::NDArray* > const&, std::vector<mxnet::NDArray*, std::allocatormxnet::NDArray* > const&, std::vector<mxnet::OpReqType, std::allocatormxnet::OpReqType > const&, mxnet::DispatchMode, mxnet::OpStatePtr)+0x839) [0x7fd8ead7e5c9]
[bt] (6) /home/cy/anaconda3/envs/mxnet/lib/python3.5/site-packages/mxnet/libmxnet.so(mxnet::Imperative::Invoke(mxnet::Context const&, nnvm::NodeAttrs const&, std::vector<mxnet::NDArray*, std::allocatormxnet::NDArray* > const&, std::vector<mxnet::NDArray*, std::allocatormxnet::NDArray* > const&)+0x38c) [0x7fd8ead7ee4c]
[bt] (7) /home/cy/anaconda3/envs/mxnet/lib/python3.5/site-packages/mxnet/libmxnet.so(+0x2b0ec09) [0x7fd8eac8ac09]
[bt] (8) /home/cy/anaconda3/envs/mxnet/lib/python3.5/site-packages/mxnet/libmxnet.so(MXImperativeInvokeEx+0x6f) [0x7fd8eac8b1ff]
[bt] (9) /home/cy/anaconda3/envs/mxnet/lib/python3.5/lib-dynload/../../libffi.so.6(ffi_call_unix64+0x4c) [0x7fd94b496ec0]
Process finished with exit code 1
The text was updated successfully, but these errors were encountered: