MXNet深度学习库简介

时间:2023-03-08 16:11:43

MXNet深度学习库简介

摘要: MXNet是一个深度学习库, 支持C++, Python, R, Scala, Julia, Matlab以及JavaScript等语言; 支持命令和符号编程; 可以运行在CPU,GPU,集群,服务器,台式机或者移动设备上. mxnet是cxxnet的下一代, cxxnet借鉴了Caffe的思想, 但是在实现上更加干净.

MXNet安装:

这里针对的是Ubuntu 12+以上的系统的安装过程, 首先安装git(如果你电脑上还没有的话):

# Install git if not already installed.
sudo apt-get update
sudo apt-get -y install git

我们需要用git将MXNet的源代码仓库克隆到本地,

# Clone mxnet repository. In terminal, run the commands WITHOUT "sudo"
git clone https://github.com/dmlc/mxnet.git ~/MXNet/mxnet --recursive # Install MXNet dependencies
cd ~/MXNet/mxnet/setup-utils
bash install-mxnet-ubuntu.sh # We have added MXNet Python package path in your ~/.bashrc.
# Run below command to refresh environment variables.
$ source ~/.bashrc

install-mxnet-ubuntu.sh里面的内容为:

#!/usr/bin/env bash
######################################################################
# This script installs MXNet for Python along with all required dependencies on a Ubuntu Machine.
# Tested on Ubuntu 14.0 + distro.
######################################################################
set -e echo "Installing build-essential, libatlas-base-dev, libopencv-dev..." sudo apt-get update
sudo apt-get install -y build-essential libatlas-base-dev libopencv-dev echo "Installing MXNet core. This can take few minutes..."
cd ~/MXNet/mxnet/
make -j$(nproc) echo "Installing Numpy..." # 安装numpy
sudo apt-get install python-numpy echo "Installing Python setuptools..."
sudo apt-get install python-setuptools echo "Installing Python package for MXNet..."
cd python; sudo python setup.py install echo "Adding MXNet path to your ~/.bashrc file"
echo "export PYTHONPATH=~/MXNet/mxnet/python" >> ~/.bashrc echo "Done! MXNet for Python installation is complete. Go ahead and explore MXNet with Python :-)"

本电脑中,build-essential, libatlas-base-dev, libopencv-dev已经是最新的版本了, numpy和python也都安装过了.

几种流行的深度学习框架比较:

MXNet深度学习库简介

参考文献:

[1]mxnet: http://mxnet.readthedocs.io/en/latest/

[2]mxnet — API 1.10 文档: https://turi.com/products/create/docs/graphlab.mxnet.html

[3]Tutorials — mxnet 0.7.0 文档: mxnet.io/tutorials/index.html

[4]MXNet - 算法组:suanfazu.com/t/mxnet/13291

[5] http://mxnet.io/