Skip to content

A simple neural network implementation in Java built from scratch, designed to demonstrate the core mechanics of neural networks in an easy-to-understand way.

Notifications You must be signed in to change notification settings

rennyjr98/Java-SimpleNeuralNetwork

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Java-SimpleNeuralNetwork

A simple neural network implementation in Java built from scratch, designed to demonstrate the core mechanics of neural networks in an easy-to-understand way.
Perfect for learning how forward propagation and weight training works without heavy libraries.


πŸš€ What Is This?

This repository contains a basic feed-forward neural network built entirely in Java, with minimal dependencies.
It’s a learning resource for developers and students who want to see, run, and modify a neural network without relying on frameworks like TensorFlow or DL4J.


πŸ›  Features

βœ” Written entirely in Java
βœ” Feed-forward neural network
βœ” Weight initialization and training logic
βœ” No external ML libraries
βœ” Easy to read and expand


πŸ“¦ Getting Started

Prerequisites

  • Java 8+
  • Maven (optional, if using)

▢️ Running

Using Maven

If the project uses Maven:

mvn compile
mvn exec:java -Dexec.mainClass="com.yourpackage.Main"

Without Maven

javac -d out/ src/*.java
java -cp out/ Main

🧠 How It Works

This neural network follows a simple process:

1. Inputs pass through layers
2. Weights and biases are applied
3. Activation functions transform values
4. Learning updates weights over iterations

πŸ“ Project Structure

Java-SimpleNeuralNetwork/
β”œβ”€β”€ src/                     # Java source code
β”‚   β”œβ”€β”€ NeuralNetwork.java   # Neural network core
β”‚   β”œβ”€β”€ Neuron.java          # Neuron & activation helpers
β”‚   └── Main.java            # Example / entry point
β”œβ”€β”€ docs/                    # Optional documentation
β”œβ”€β”€ examples/                # Example inputs / cases
β”œβ”€β”€ .gitignore
β”œβ”€β”€ pom.xml                  # (If using Maven)
└── README.md

About

A simple neural network implementation in Java built from scratch, designed to demonstrate the core mechanics of neural networks in an easy-to-understand way.

Topics

Resources

Stars

Watchers

Forks

Languages