Brain4J

Welcome to the official documentation of Brain4J. Here you will find explanations, practical examples, and detailed references covering the core features and design principles of the framework.

What's Brain4J?

Brain4J is an open-source machine learning framework written entirely in Java, designed for the development, training, and deployment of neural networks with a strong focus on performance, efficiency, and portability.

Unlike traditional machine learning frameworks such as DL4J, PyTorch, or TensorFlow, Brain4J does not rely on large external ecosystems or heavyweight native bindings. Its architecture is intentionally minimal, explicit, and close to the underlying math, making behavior predictable and controllable.

Why choose Brain4J?

  • Pure Java, minimal footprint: Two <10 MB JARs, almost no external dependencies.

  • Fast by design: Custom tensor engine with SIMD CPU optimizations and GPU support.

  • Predictable and explicit: No hidden magic, no opaque graphs, full control over execution.

  • Production-friendly: Ideal for plugins, lightweight servers, JVM-only and edge environments.

  • More than a toy: Supports modern models (CNN, RNN, LSTM, Transformers, GCN) and optimizers.

Start now

GPU

Discover how to boost performance using the GPU

Kotlin Notebooks

Learn how to use Brain4J in a Jupyter-fashioned way

Last updated