A lightweight deep learning demo built in Java using Deeplearning4j (DL4J) . This project demonstrates how to build, train, and visualize a simple neural network โ all within a pure Java environment.
โ Implements a fully connected neural network using DL4J
๐ Includes a live training UI via UIServer and StatsListener
๐งฉ Utilizes DataVec for dataset parsing, schema transformation, and preprocessing
โ๏ธ Configurable layers, activation functions, and optimizers
๐พ Easily extendable for your own CSV or in-memory datasets
Component Description Language Java Framework Deeplearning4j Data Pipeline DataVec Visualization DL4J UI Server Build Tool Maven / Gradle (depending on your setup)
Loads data โ from a CSV file or in-memory collection
Defines a schema and applies transformations via TransformProcess
Builds a neural network using NeuralNetConfiguration and multiple DenseLayers
Trains the model, tracking progress with StatsListener
Launches the DL4J UI to visualize performance and metrics in real time
Prerequisites
Make sure you have:
Java 11+
Maven or Gradle
(Optional) A CSV dataset if youโre experimenting with custom data
Steps
git clone https://github.com/yourusername/deeplearning-demo.git cd deeplearning-demo
mvn clean install mvn exec:java -Dexec.mainClass="com.deeplearning.App"
Once running, open your browser to:
to view the interactive DL4J Training Dashboard.
During training, the console and UI will display:
Iteration loss (via ScoreIterationListener)
Network accuracy and error
Live plots of learning rate, gradients, and parameters
Add different activation functions and optimizers
Integrate a real-world dataset (e.g., MNIST or Iris)
Save and load trained models
Add evaluation metrics (precision, recall, F1-score)