Java deep learning from scratch, with GPU ambitions
A Java framework that implements core neural network algorithms and tries to push them to the GPU via OpenCL and Aparapi.

What it does This is a from-scratch Java implementation of classic deep learning building blocks: multilayer perceptrons, CNNs with various pooling strategies, RBMs, autoencoders, and deep belief networks. It covers backpropagation with dropout, contrastive divergence, and greedy layer-wise pretraining. GPU execution is supported through both native OpenCL and Aparapi, an AMD-backed library that translates Java bytecode to OpenCL kernels.
The interesting bit
The architecture treats every network as a directed acyclic graph of layers and connections, not just a stack. A LayerCalculator does breadth-first traversal to determine computation order, while ConnectionCalculator handles the actual math. This graph structure means you can theoretically wire up more exotic topologies than simple feedforward nets—though the README only points to an ImageNet paper as inspiration, with no working example shown.
Key highlights
- Supports MNIST, CIFAR-10/100, IRIS, and XOR out of the box
- Activation functions include ReLU, LRN, Softplus, and Softmax, all with GPU paths
- Native OpenCL implementation avoids Aparapi’s restrictions (no complex objects, no external method calls)
- Modular tiered design: network definition → data propagation → training → input providers
- MIT licensed
Caveats
- The author explicitly warns: “you can build the project, but some of the tests are not working”
- Aparapi setup requires manual
.dll/.sowrangling and PATH tweaks; the linked Google Code archive is a fossil nn-userinterfaceis noted as “unfinished work on visual network representation”- No performance numbers or benchmarks are provided in the README
Verdict Worth a look if you’re stuck in a Java-only environment and need to understand (or teach) how neural nets work under the hood. Skip it if you want production-ready training or modern architectures—this predates batch normalization, attention, and the transformer era by a comfortable margin.