linux下安装mxnet和python接口配置

5 篇文章 0 订阅
3 篇文章 0 订阅

Build the MXNet core shared library

Step 1 Install build tools and git.

$ sudo apt-get update
$ sudo apt-get install -y build-essential git

Step 2 Install OpenBLAS.

MXNet uses BLAS library for accelerated numerical computations. There are several flavors of BLAS libraries - OpenBLAS, ATLAS and MKL. In this step we install OpenBLAS. You can choose to install ATLAS or MKL.

$ sudo apt-get install -y libopenblas-dev

Step 3 Install OpenCV.

MXNet uses OpenCV for efficient image loading and augmentation operations.

$ sudo apt-get install -y libopencv-dev

Step 4 Download MXNet sources and build MXNet core shared library.

$ git clone --recursive https://github.com/dmlc/mxnet
$ cd mxnet
$ make -j $(nproc) USE_OPENCV=1 USE_BLAS=openblas USE_CUDA=1 USE_CUDA_PATH=/usr/local/cuda USE_CUDNN=1

Note - USE_OPENCV, USE_BLAS, USE_CUDA, USE_CUDA_PATH AND USE_CUDNN are make file flags to set compilation options to use OpenCV, OpenBLAS, CUDA and cuDNN libraries. You can explore and use more compilation options in make/config.mk. Make sure to set USE_CUDA_PATH to right CUDA installation path. In most cases it is - /usr/local/cuda.


Build the MXNet Python binding

Step 1 Install prerequisites - python setup tools and numpy.

$ sudo apt-get install -y python-dev python-setuptools python-numpy

Step 2 Build the MXNet Python binding.

$ cd python
$ sudo python setup.py install

Step 3 Install Graphviz. (Optional, needed for graph visualization using mxnet.viz package).

sudo apt-get install graphviz
pip install graphviz

Step 4 Validate the installation by running simple MXNet code described here.


参考网址: http://mxnet.io/get_started/install.html

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值