DeepX is a deep learning library designed with flexibility and succinctness in mind. The key aspect is an expressive shorthand to describe your neural network architecture.
DeepX supports both Tensorflow and PyTorch.
$ pip install deepx
The first step in building your first network is to define your model. The model is the input-output structure of your network. Let's consider the task of classifying MNIST with a multilayer perceptron (MLP).
>>> from deepx.nn import *
>>> net = Relu(200) >> Relu(200) >> Softmax(10)
Our model behaves like a function.
>>> import tensorflow as tf
>>> net(tf.ones((10, 784)))
To get the weights out of the network, we can just say:
>>> net.get_parameters()
We can also use a convolutional neural network for classification and it'll work exactly the same!
>>> net = (Reshape([28, 28, 1])
>> Conv([2, 2, 64])
>> Conv([2, 2, 32])
>> Conv([2, 2, 16])
>> Flatten() >> Relu(200) >> Relu(200) >> Softmax(10))
That's it, we're done!