{"id":25133108,"url":"https://github.com/professornova/ann-scratch","last_synced_at":"2026-04-30T15:33:11.340Z","repository":{"id":194158419,"uuid":"689659247","full_name":"ProfessorNova/ANN-Scratch","owner":"ProfessorNova","description":"This repository implements a simple Artificial Neural Network (ANN) from scratch using only NumPy. ","archived":false,"fork":false,"pushed_at":"2024-08-24T06:02:45.000Z","size":977,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T01:27:48.765Z","etag":null,"topics":["artificial-intelligence","neural-network","numpy","scratch"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ProfessorNova.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-10T14:11:03.000Z","updated_at":"2024-08-24T06:02:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"cad3b971-1ece-4ccf-9ff7-88f50514ea7e","html_url":"https://github.com/ProfessorNova/ANN-Scratch","commit_stats":null,"previous_names":["professornova/ann-scratch"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ProfessorNova/ANN-Scratch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProfessorNova%2FANN-Scratch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProfessorNova%2FANN-Scratch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProfessorNova%2FANN-Scratch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProfessorNova%2FANN-Scratch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ProfessorNova","download_url":"https://codeload.github.com/ProfessorNova/ANN-Scratch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProfessorNova%2FANN-Scratch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32469344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artificial-intelligence","neural-network","numpy","scratch"],"created_at":"2025-02-08T15:34:14.903Z","updated_at":"2026-04-30T15:33:11.320Z","avatar_url":"https://github.com/ProfessorNova.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ANN-Scratch\n\nThis repository implements a simple Artificial Neural Network (ANN) from scratch\nusing only numpy. It was tested on the MNIST dataset and achieved an accuracy of\naround 95% after 50 epochs (The hyperparameters were not tuned so there is room\nfor improvement).\n\n---\n\n## Getting Started\n\n### Installation\n\nYou basically just have to have numpy installed (as well as matplotlib if you want\nto plot the data). You can install them using pip:\n\n```bash\npip install numpy matplotlib\n```\n\nThen clone the repository:\n\n```bash\ngit clone https://github.com/ProfessorNova/ANN-Scratch.git\ncd ANN-Scratch\n```\n\nThe code was tested on Python 3.10.11.\n\n### Usage\n\nThe functionality is shown with visualisation in [train.ipynb](https://github.com/ProfessorNova/ANN-Scratch/blob/main/train.ipynb). You can also run the code in [train.py](https://github.com/ProfessorNova/ANN-Scratch/blob/main/train.py)\nwith the following command (there you will only see the loss and accuracy printed in the console):\n\n```bash\npython train.py\n```\n\n---\n\n## Components\n\nThe repository is divided into the following components:\n\n- [lib/activations_functions.py](https://github.com/ProfessorNova/ANN-Scratch/blob/main/lib/activation_functions.py): Contains the activation functions and their derivatives. The following activation\n  functions are implemented:\n    - Sigmoid\n    - Linear\n    - Softmax\n    - ReLU\n\n- [lib/neural_layer.py](https://github.com/ProfessorNova/ANN-Scratch/blob/main/lib/neural_layer.py): Contains the NeuralLayer class which represents a layer in the neural network. It contains\n  the forward and backward methods as well as a method to update the weights and biases.\n\n- [lib/neural_network.py](https://github.com/ProfessorNova/ANN-Scratch/blob/main/lib/neural_network.py): Contains the NeuralNetwork class which represents the neural network. It implements the\n  backpropagation algorithm and stochastic gradient descent. It also has methods to save and load the model.\n\n- [lib/data_loader.py](https://github.com/ProfessorNova/ANN-Scratch/blob/main/lib/data_loader.py): Contains a function to load the given `mnist_test.csv` and `mnist_train.csv` files.\n  Furthermore, it automatically preprocesses the data by normalizing it and converting the labels to one-hot encoding.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprofessornova%2Fann-scratch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprofessornova%2Fann-scratch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprofessornova%2Fann-scratch/lists"}