博客
关于我
工程实践_LFFD模型训练过程疑难杂症debug
阅读量:537 次
发布时间:2019-03-08

本文共 2359 字,大约阅读时间需要 7 分钟。

1.MxNet版本的LFFD需要安装CUDA10.1版本和CuDNN

若不满足会出现如下问题:

安装的CUDA版本太低或没有安装:

raceback (most recent call last):  File "configuration_10_320_20L_5scales_v2.py", line 17, in 
import mxnet File "/usr/local/lib/python3.6/dist-packages/mxnet/__init__.py", line 24, in
from .context import Context, current_context, cpu, gpu, cpu_pinned File "/usr/local/lib/python3.6/dist-packages/mxnet/context.py", line 24, in
from .base import classproperty, with_metaclass, _MXClassPropertyMetaClass File "/usr/local/lib/python3.6/dist-packages/mxnet/base.py", line 213, in
_LIB = _load_lib() File "/usr/local/lib/python3.6/dist-packages/mxnet/base.py", line 204, in _load_lib lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_LOCAL) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode)OSError: libcudart.so.10.1: cannot open shared object file: No such file or directory

没有安装CuDNN:

terminate called after throwing an instance of 'dmlc::Error'  what():  [20:48:36] ../include/mshadow/./stream_gpu-inl.h:173: Check failed: err == CUDNN_STATUS_SUCCESS (4 vs. 0) : CUDNN_STATUS_INTERNAL_ERRORAborted (core dumped)

2.正确使用Python和正确安装MxNet版本

若已经正确安装CUDA和CUDNN,仍然出现:

terminate called after throwing an instance of 'dmlc::Error'  what():  [20:48:36] ../include/mshadow/./stream_gpu-inl.h:173: Check failed: err == CUDNN_STATUS_SUCCESS (4 vs. 0) : CUDNN_STATUS_INTERNAL_ERRORAborted (core dumped)

有两种可能:首先查看MxNet版本是否正确,再在configuration_10_560_25L_8scales_v1.py代码中将如下代码注释:

# add mxnet python path to path env if needmxnet_python_path = '/home/heyonghao/libs/incubator-mxnet/python'sys.path.append(mxnet_python_path)

我们只需要使用我们本地默认的Python就行。

3.正确安装OpenCV

如出现如下问题:

During handling of the above exception, another exception occurred:Traceback (most recent call last):  File "_ctypes/callbacks.c", line 234, in 'calling callback function'  File "/root/work/mxnet/python/mxnet/operator.py", line 1052, in backward_entry    print('Error in CustomOp.backward: %s' % traceback.format_exc())UnicodeEncodeError: 'ascii' codec can't encode characters in position 369-376: ordinal not in range(128)

说明OpenCV版本没有正确安装,删除旧版本之后安装如下版本:

pip install opencv-python==3.4.5.20

4.正确设置batch_size

遇到如下问题,很可能是batch_size设置的太大:

MXNetError: cudaMalloc retry failed: out of memory

可以设置batch_size=16

转载地址:http://gsbiz.baihongyu.com/

你可能感兴趣的文章
Netty工作笔记0025---SocketChannel API
查看>>
Netty工作笔记0026---NIO 网络编程应用--群聊系统1---编写服务器1
查看>>
Netty工作笔记0027---NIO 网络编程应用--群聊系统2--服务器编写2
查看>>
Netty工作笔记0028---NIO 网络编程应用--群聊系统3--客户端编写1
查看>>
Netty工作笔记0029---NIO 网络编程应用--群聊系统4--客户端编写2
查看>>
Netty工作笔记0030---NIO与零拷贝原理剖析
查看>>
Netty工作笔记0031---NIO零拷贝应用案例
查看>>
Netty工作笔记0032---零拷贝AIO内容梳理
查看>>
Netty工作笔记0033---Netty概述
查看>>
Netty工作笔记0034---Netty架构设计--线程模型
查看>>
Netty工作笔记0035---Reactor模式图剖析
查看>>
Netty工作笔记0036---单Reactor单线程模式
查看>>
Netty工作笔记0037---主从Reactor多线程
查看>>
Netty工作笔记0038---Netty模型--通俗版
查看>>
Netty工作笔记0039---Netty模型--详细版
查看>>
Netty工作笔记0040---Netty入门--服务端1
查看>>
Netty工作笔记0041---Netty入门--服务端2
查看>>
Netty工作笔记0042---Netty入门--编写客户端
查看>>
Netty工作笔记0043---单Reactor多线程模式
查看>>
Netty工作笔记0044---Netty案例源码分析
查看>>