DJL is a high-level Java framework for building, training, and deploying neural networks across engines, with ergonomic APIs and swappable backends including PyTorch, TensorFlow, MXNet, and ONNX Runtime
Overview
DJL targets Java developers who want machine learning workflows that match the rest of their application stack. You can load models, run inference, and train networks using familiar IDE tooling while DJL abstracts engine-specific details behind a consistent API surface.
Because the framework is engine agnostic, projects can start on one runtime and migrate later, with automatic CPU or GPU selection based on available hardware. Pseudocode-style examples in the documentation illustrate both inference and training flows, lowering the barrier for teams that are new to deep learning but fluent in Java.
Supporting resources include a companion D2L book port, JavaDoc references, demo repositories, and community channels for questions and release updates. Source builds use Gradle, and the project is maintained under the Apache License with regular numbered releases.
Key features
- Engine-agnostic model execution
- Java-native training and inference APIs
- PyTorch, TensorFlow, MXNet, ONNX backends
- Automatic CPU and GPU selection
- Companion deep learning coursework
- Gradle-based source builds
Use cases
- Serving models inside Java services
- Teaching machine learning in Java courses
- Migrating between DL engine backends
- Embedding inference in enterprise apps