Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License

This project is licensed under the MIT License – see the LICENSE file for details.

Neuronix

Neuronix is a lightweight machine learning framework built from scratch in Java.

The goal of the project is to understand every part of neural networks by implementing them without external machine learning libraries.

Features

  • Matrix operations
  • Dense neural networks
  • Backpropagation
  • MNIST dataset loader (IDX format)
  • Model serialization (save/load)
  • Mini-batch training with shuffling
  • SGD and Momentum optimizers
  • Cross-entropy and mean squared error losses
  • Accuracy metric and evaluation
  • Pure Java

Running the demo

The Main class trains a small network on MNIST and saves the model. You need the four MNIST files from the official site:

./gradlew run --args="train <train-images> <train-labels> <test-images> <test-labels>"

The model is written to neuronix.model.

Reusing a trained model

Load a previously saved model and evaluate it on test data without retraining:

./gradlew run --args="predict <model-file> <test-images> <test-labels>"

It prints the achieved test accuracy and a few sample predictions.

Recognizing your own digit image

Feed one or more image files (PNG/JPG) to a trained model and get a prediction:

./gradlew run --args="predict-image <model-file> <image-file>..."

The image is converted to 28×28 grayscale (inverted, centered like MNIST) before classification.

Quality checks

./gradlew check

Runs spotless (formatting), Checkstyle, PMD and the test suite.

About

Custom AI agent

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages