Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/phill030/xor-neuralnetwork

A basic implementation of a NeuralNetwork in Rust
https://github.com/phill030/xor-neuralnetwork

Last synced: 14 days ago
JSON representation

A basic implementation of a NeuralNetwork in Rust

Awesome Lists containing this project

README

        


NeuralNetwork


Kofi


- [Getting Started](#getting-started)
- [Credits](#credits)
- [Features](#features)
- [Usage](#usage)

---

# Getting Started

This project implements a basic neural network from scratch in Rust. It includes an input layer, dense layers, and an output layer, allowing for flexible configuration and training. The neural network uses the sigmoid activation function and supports backpropagation for training. Additionally, the project includes functionality to visualize the training loss over epochs using the plotters crate.



Cross-Entropy loss function


# Credits

Thanks to the help of [@FrozenAssassine](https://github.com/FrozenAssassine) and [@finn-freitag](https://github.com/finn-freitag/) I've built this NeuralNetwork from scratch!

# Features

- **Layered Architecture:** Includes input, dense, and output layers.
- **Feed Forward:** Implemented feed-forward algorithm.
- **Backpropagation:** Training through backpropagation using gradient descent.
- **Cross-Entropy Loss:** Utilized cross-entropy loss for binary classification.
- **Visualization:** Plot training loss over epochs using plotters library.

# Usage

1. Clone the repository to your local machine:

```bash
git clone https://github.com/Phill030/XOR-NeuralNetwork.git
cd XOR-NeuralNetwork
```

2. Build the project using Cargo:

```bash
cargo run
```

This will train the neural network on a simple XOR dataset, print the predictions, and generate a plot of the training loss over epochs as loss_plot.png.