Skip to content

Repository files navigation

nn-rs 🤖

A simple neural network library written in Rust, focusing on performant matrix operations. This project serves as an exploration of Rust's capabilities for numerical computing, including parallel processing with Rayon.


Prerequisites

Ensure you have the Rust toolchain installed on your system. You can install it from the official website: rustup.rs.


Building and Running

You can build and run the project using standard Cargo commands. It's recommended to use the --release flag for performance-critical tasks.

To build the project:

cargo build --release

To run the main application binary:

cargo run --release

Running Tests 🧪

This project contains both unit tests (located within the src/ directory) and integration tests (located in the tests/ directory).

To run all tests, execute the following command:

cargo test

Running Benchmarks ⏱

The project includes a custom benchmark suite to measure and compare the performance of different matrix multiplication algorithms (sequential, parallel, and optimized).

To run the benchmarks, use this command:

cargo bench

Project Structure

  • src/: Contains the main application (main.rs) and all the core library logic (e.g., matrix.rs).
  • tests/: Contains integration tests that test the public API of the library.
  • benches/: Contains custom benchmark programs for performance measurement.
  • Cargo.toml: The package manifest that defines project metadata and dependencies.

About

neural network in rust from scratch

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages