{"id":26522376,"url":"https://github.com/csanri/simplenn","last_synced_at":"2026-04-19T15:01:38.203Z","repository":{"id":283561906,"uuid":"952156316","full_name":"csanri/SimpleNN","owner":"csanri","description":"Simple Neural Network for MNIST Classification","archived":false,"fork":false,"pushed_at":"2025-03-20T21:42:23.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-25T15:54:16.485Z","etag":null,"topics":["machine-learning-algorithms","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/csanri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-03-20T20:28:07.000Z","updated_at":"2025-03-20T21:48:29.000Z","dependencies_parsed_at":"2025-03-20T22:38:13.590Z","dependency_job_id":null,"html_url":"https://github.com/csanri/SimpleNN","commit_stats":null,"previous_names":["csanri/simplenn"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/csanri/SimpleNN","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csanri%2FSimpleNN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csanri%2FSimpleNN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csanri%2FSimpleNN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csanri%2FSimpleNN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csanri","download_url":"https://codeload.github.com/csanri/SimpleNN/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csanri%2FSimpleNN/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32010957,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["machine-learning-algorithms","neural-network","numpy","python"],"created_at":"2025-03-21T13:26:49.402Z","updated_at":"2026-04-19T15:01:38.181Z","avatar_url":"https://github.com/csanri.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Neural Network for MNIST Classification\n\nA from-scratch implementation of a 2-layer neural network using NumPy for handwritten digit recognition on the MNIST dataset. This project demonstrates fundamental deep learning concepts and achieves **~95% accuracy** on the test set.\n\n## Key Features\n- Pure NumPy implementation (no deep learning frameworks)\n- Two-layer neural network architecture\n- ReLU activation in hidden layer\n- Softmax output layer\n- Cross-entropy loss function\n- Stochastic Gradient Descent (SGD) with backpropagation\n- Vectorized operations for efficient computation\n\n## Neural Network Architecture\n\n### Forward Pass Equations\n\n**Layer 1 (Input → Hidden):**\n```math\n\\begin{aligned}\n\\mathbf{l}_1 \u0026= \\mathbf{W}_1 \\mathbf{x} + \\mathbf{b}_1 \\\\\n\\mathbf{y}_1 \u0026= \\text{ReLU}(\\mathbf{l}_1)\n\\end{aligned}\n```\n\n**Layer 2 (Hidden → Output):**\n\n```math\n\\begin{aligned}\n\\mathbf{l}_2 \u0026= \\mathbf{W}_2 \\mathbf{y}_1 + \\mathbf{b}_2 \\\\\n\\mathbf{y}_2 \u0026= \\text{softmax}(\\mathbf{l}_2)\n\\end{aligned}\n```\n\n### Backward Pass Equations\n\n**Output Layer Gradients:**\n```math\n\\begin{aligned}\n\\frac{\\partial \\mathcal{L}}{\\partial \\mathbf{W}_2} \u0026= \\frac{1}{m} (\\mathbf{y}_2 - \\mathbf{y}_{\\text{true}}) \\mathbf{y}_1^\\top \\\\\n\\frac{\\partial \\mathcal{L}}{\\partial \\mathbf{b}_2} \u0026= \\frac{1}{m} \\sum (\\mathbf{y}_2 - \\mathbf{y}_{\\text{true}})\n\\end{aligned}\n```\n\n**Hidden Layer Gradients:**\n```math\n\\begin{aligned}\n\\frac{\\partial \\mathcal{L}}{\\partial \\mathbf{W}_1} \u0026= \\frac{1}{m} \\left(\\mathbf{W}_2^\\top (\\mathbf{y}_2 - \\mathbf{y}_{\\text{true}}) \\odot \\text{ReLU}'(\\mathbf{l}_1)\\right) \\mathbf{x}^\\top \\\\\n\\frac{\\partial \\mathcal{L}}{\\partial \\mathbf{b}_1} \u0026= \\frac{1}{m} \\sum \\left(\\mathbf{W}_2^\\top (\\mathbf{y}_2 - \\mathbf{y}_{\\text{true}}) \\odot \\text{ReLU}'(\\mathbf{l}_1)\\right)\n\\end{aligned}\n```\n\n**ReLU Derivative:**\n```math\n\\text{ReLU}'(x) = \\begin{cases} \n1 \u0026 \\text{if } x \u003e 0 \\\\\n0 \u0026 \\text{otherwise}\n\\end{cases}\n```\n**Softmax:**\n```math\n\\text{softmax}(z_i) = \\frac{\\exp(z_i)}{\\sum_{c=1}^C \\exp(z_c)}\n```\n\n## Installation\n\n1. Clone repository:\n```bash\ngit clone https://github.com/csanri/SimpleNN\ncd SimpleNN\n```\n2. Install requirements:\n```bash\npip install -r requirements.txt\n```\n\n3. Run the script:\n\n```bash\npython main.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsanri%2Fsimplenn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsanri%2Fsimplenn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsanri%2Fsimplenn/lists"}