{"id":15556681,"url":"https://github.com/ryandsilva/nn-from-scratch","last_synced_at":"2026-03-17T22:32:42.719Z","repository":{"id":97193395,"uuid":"257371188","full_name":"RyanDsilva/nn-from-scratch","owner":"RyanDsilva","description":":star: Implementation of Neural Networks from Scratch Using Python \u0026 Numpy :star:","archived":false,"fork":false,"pushed_at":"2020-10-09T16:47:53.000Z","size":569,"stargazers_count":17,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-31T20:49:00.457Z","etag":null,"topics":["deep-learning","hacktoberfest","machine-learning","neural-network","numpy","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RyanDsilva.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null}},"created_at":"2020-04-20T18:34:08.000Z","updated_at":"2023-04-11T04:51:02.000Z","dependencies_parsed_at":"2023-03-15T06:15:45.640Z","dependency_job_id":null,"html_url":"https://github.com/RyanDsilva/nn-from-scratch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RyanDsilva/nn-from-scratch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyanDsilva%2Fnn-from-scratch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyanDsilva%2Fnn-from-scratch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyanDsilva%2Fnn-from-scratch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyanDsilva%2Fnn-from-scratch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RyanDsilva","download_url":"https://codeload.github.com/RyanDsilva/nn-from-scratch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyanDsilva%2Fnn-from-scratch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30633339,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T17:32:55.572Z","status":"ssl_error","status_checked_at":"2026-03-17T17:32:38.732Z","response_time":56,"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":["deep-learning","hacktoberfest","machine-learning","neural-network","numpy","python"],"created_at":"2024-10-02T15:14:35.775Z","updated_at":"2026-03-17T22:32:42.701Z","avatar_url":"https://github.com/RyanDsilva.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Neural Networks From Scratch\n\n🌟 Implementation of Neural Networks from Scratch Using Python \u0026amp; Numpy 🌟\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"images/nn.webp\" width=\"550px\"\u003e\n\u003c/p\u003e\n\n\u003e Uses Python 3.7.4\n\n#### This repository has detailed math equations and graphs for every feature implemented that can be used to serve as basis for greater, in-depth understanding of Neural Networks. Basic understanding of Linear Algebra, Matrix Operations and Calculus is assumed.\n\n## Contents 📑\n\n- [Core Concepts](./core)\n- [Activation Functions](./activations)\n- [Loss Functions](./loss)\n- [Optimizers](./optimizers)\n\n## Setup 💻\n\n```bash\ngit clone \u003curl\u003e\npip install -r requirements.txt\n```\n\nHere, Keras is used just to load the MNIST dataset\n\n## Usage 📔\n\n- Tune hyperparameters in `config.py`\n- Run the following command\n\n```bash\npython main.py\n```\n\n#### Output:\n\n\u003cpre\u003e\n$ python main.py\nepoch 1/30      error=0.173172\nepoch 2/30      error=0.077458\nepoch 3/30      error=0.058955\nepoch 4/30      error=0.048161\n.....\n.....\n.....\nepoch 26/30     error=0.010333\nepoch 27/30     error=0.009944\nepoch 28/30     error=0.009602\nepoch 29/30     error=0.009298\nepoch 30/30     error=0.009045\n\nPredicted Values: \n[array([[-4.31825197e-04, -1.80361575e-03,  6.84263430e-03,\n        -1.42045839e-02, -1.32599433e-02, -3.67077777e-02,\n         3.73258781e-02,  \u003cb\u003e0.97446495\u003c/b\u003e,  4.59079629e-02,\n        -8.94465105e-03]]), \narray([[ 0.0461294 , -0.00845601,  \u003cb\u003e0.8578162\u003c/b\u003e , -0.00272202,  0.01397735,\n         0.17131938,  0.21350745, -0.06529926,  0.01975232, -0.10840968]])]\nTrue Values: \n[[0. 0. 0. 0. 0. 0. 0. 1. 0. 0.]\n [0. 0. 1. 0. 0. 0. 0. 0. 0. 0.]]\n\u003c/pre\u003e\n\n## Roadmap 📑\n\n- [ ] Activation Functions\n  - [x] Linear\n  - [x] Sigmoid\n  - [x] Tanh\n  - [x] Tanh\n  - [x] ReLu\n  - [x] LeakyReLu\n  - [x] SoftMax\n  - [ ] GeLu\n- [ ] Loss Functions\n  - [x] MAE\n  - [x] MSE\n  - [ ] CrossEntropy\n- [ ] Optimizers Functions\n  - [x] Gradient Descent\n  - [x] Gradient Descent w/ Momentum\n  - [x] Nestrov's Accelerated\n  - [x] RMSProp\n  - [ ] Adam\n- [ ] Regularization\n  - [ ] L1\n  - [ ] L2\n  - [ ] Dropout\n- [x] Layer Architecture\n- [x] Wrapper Classes\n- [x] Hyperparameters Configuration\n- [ ] Clean Architecture\n- [ ] UI (Similar to Tensorflow Playground)\n\n##### This project is not meant to be production ready but instead serve as the foundation repository to understand the in-depth working of Neural Networks down to the mathematics of the task.\n\n###### Collaborations in implementing and maintaining this project are welcome. Kindly reach out to me if interested.\n\n## Contributers 🌟\n\n\u003ca href=\"https://github.com/RyanDsilva\"\u003e\n  \u003cimg src=\"https://github.com/RyanDsilva.png?size=75\" style=\"border-radius:50%;\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/sanfernoronha\"\u003e\n  \u003cimg src=\"https://github.com/sanfernoronha.png?size=75\" style=\"border-radius:50%;\"\u003e\n\u003c/a\u003e\n\n## References 📚\n\n- Deep Learning Specialization, Andrew NG - Coursera\n- [Machine Learning Cheatsheet](https://ml-cheatsheet.readthedocs.io/en/latest/index.html)\n\n\u003e \u0026copy; 2020 Ryan Dsilva\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryandsilva%2Fnn-from-scratch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryandsilva%2Fnn-from-scratch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryandsilva%2Fnn-from-scratch/lists"}