MXNet: Difference between revisions
Jump to navigation
Jump to search
(Marked this version for translation) |
m (Updated quick example to use an MXNet numpy matrix.) |
||
Line 32: | Line 32: | ||
<!--T:12--> | <!--T:12--> | ||
3. Validate it | 3. Validate it. | ||
{{Command | {{Command | ||
|prompt=(env) [name@server ~] | |prompt=(env) [name@server ~] | ||
|python -c "import mxnet as mx | |python -c "import mxnet as mx;print((mx.nd.ones((2, 3))*2).asnumpy());" | ||
|result= | |result= | ||
[ | [[2. 2. 2.] | ||
[2. 2. 2.]] | |||
}} | }} | ||
</translate> | </translate> |
Revision as of 14:50, 13 July 2022
Apache MXNet is a deep learning framework designed for both efficiency and flexibility. It allows you to mix symbolic and imperative programming to maximize efficiency and productivity. At its core, MXNet contains a dynamic dependency scheduler that automatically parallelizes both symbolic and imperative operations on the fly. A graph optimization layer on top of that makes symbolic execution fast and memory efficient. MXNet is portable and lightweight, scalable to many GPUs and machines.
Available wheels
You can list available wheels using the avail_wheels command.
[name@server ~]$ avail_wheels mxnet
name version python arch
------ --------- -------- ------
mxnet 1.9.1 cp39 avx2
mxnet 1.9.1 cp38 avx2
mxnet 1.9.1 cp310 avx2
Installing in a Python virtual environment
1. Create and activate a Python virtual environment.
[name@server ~]$ module load python/3.10
[name@server ~]$ virtualenv --no-download ~/env
[name@server ~]$ source ~/env/bin/activate
2. Install MXNet and its Python dependencies.
(env) [name@server ~] pip install --no-index mxnet
3. Validate it.
(env) [name@server ~] python -c "import mxnet as mx;print((mx.nd.ones((2, 3))*2).asnumpy());"
[[2. 2. 2.]
[2. 2. 2.]]