JOML API is quite similar to Keras Sequential Model
API.
It is for now available on TestPypi. You can install it using this:
$ pip install --index-url https://test.pypi.org/project/ joml
from joml.network import Network
from joml.layer import Layer, SoftMaxCrossEntropyOutputLayer
import numpy as np
# Loading/transforming data into np.ndarray
x_train, y_train, x_test, y_test = my_loader()
# Here those are arrays of respective shape :
# (14, num_examples) for x_train and x_test
# (4, num_examples) for y_train and y_test
# Defining your network
network = Network(input_size=14, name="My really first network")
network.stack(Layer(size=100))
network.stack(Layer(size=40))
network.output(SoftMaxCrossEntropyOutputLayer(size=4))
# Training
network.train(x_train,y_train)
# … wait (a bit) ⏳
# Profit ! 🚀
y_pred, y_hat, accuracy = network.test(x_test,y_test)
See examples
for some examples.
The API is not definitive yet : More to come soon !
JOML means "JOML One More Layer".
This project license is MIT.