mxnet
- Version:
1.8.0
- Category:
ai
- Cluster:
Loki
Description
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.
Documentation
$ python -c "import mxnet; print(mxnet.__version__)"
Common modules:
mxnet.ndarray - Tensor operations (imperative)
mxnet.symbol - Symbolic graph programming
mxnet.gluon - High-level neural network API
mxnet.autograd - Automatic differentiation
To check GPU support:
>>> import mxnet as mx
>>> mx.context.num_gpus()
Full documentation: https://mxnet.apache.org/versions/1.8.0/
Examples/Usage
Load the MXNet module:
$ module load ai/mxnet-py37-cuda10.2-gcc8/1.8.0
Unload the module:
$ module unload ai/mxnet-py37-cuda10.2-gcc8/1.8.0
Example usage in Python:
import mxnet as mx from mxnet import nd x = nd.array([1, 2, 3]) print((x * 2).asnumpy())
Train a neural network with Gluon:
from mxnet.gluon import nn net = nn.Sequential() net.add(nn.Dense(64, activation='relu')) net.add(nn.Dense(10)) net.initialize() print(net)
Installation
Source code and binaries are obtained from Apache MXNet