mxnet学习笔记-安装
程序员文章站
2024-03-14 12:29:04
...
Note:This blog without all the resources that are outside the original,reproduced please indicate the source.
官网,安装指导:mxnet.incubator.apache.org
选择合适自己的安装环境
本人MacOS,Python,CPU,Pip.
安装依赖
Install prerequisites - Homebrew, python developmenttools
# Install Homebrew
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ export PATH=/usr/local/bin:/usr/local/sbin:$PATH
# Install python development tools - python2.7, pip, python-setuptools
$ brew install python
安装 MXNet
安装mxnet需要最新版本的pip
$ pip install --upgrade pip
$ pip install --upgrade setuptools
安装mxnet
$ pip install mxnet==0.11.0
安装Graphviz(可选)
$ brew install graphviz
$ pip install graphviz
验证mxnet是否安装成功
bash打开python,输入测试代码:
>>> import mxnet as mx
>>> a = mx.nd.ones((2, 3))
>>> b = a * 2 + 1
>>> b.asnumpy()
-------
(正确会输出结果)
array([[ 3., 3., 3.],
[ 3., 3., 3.]], dtype=float32)
退出python
>>> exit()
$
上一篇: Redis 脱坑指南