{"id":21029587,"url":"https://github.com/aiboy996/npnn","last_synced_at":"2026-05-16T09:35:33.804Z","repository":{"id":233298399,"uuid":"786799259","full_name":"AIboy996/npnn","owner":"AIboy996","description":"NumPy Neural Network framework","archived":false,"fork":false,"pushed_at":"2024-04-28T17:02:29.000Z","size":39198,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-25T13:27:16.907Z","etag":null,"topics":["autograd","machine-learning","neural-network","numpy"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/npnn/","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/AIboy996.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,"zenodo":null}},"created_at":"2024-04-15T10:24:32.000Z","updated_at":"2024-04-28T17:02:32.000Z","dependencies_parsed_at":"2024-04-28T17:43:49.576Z","dependency_job_id":"c0a94a1f-db44-4fa3-95c2-c15bfc2f45cb","html_url":"https://github.com/AIboy996/npnn","commit_stats":null,"previous_names":["aiboy996/nnn","aiboy996/npnn"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/AIboy996/npnn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AIboy996%2Fnpnn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AIboy996%2Fnpnn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AIboy996%2Fnpnn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AIboy996%2Fnpnn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AIboy996","download_url":"https://codeload.github.com/AIboy996/npnn/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AIboy996%2Fnpnn/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33097025,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["autograd","machine-learning","neural-network","numpy"],"created_at":"2024-11-19T12:13:18.158Z","updated_at":"2026-05-16T09:35:33.790Z","avatar_url":"https://github.com/AIboy996.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [npnn](https://pypi.org/project/npnn/)\n\u003e NumPy Neural Network\n\n[![PyPI - Version](https://img.shields.io/pypi/v/npnn)](https://pypi.org/project/npnn/)\n![PyPI - Implementation](https://img.shields.io/pypi/implementation/npnn)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/npnn)\n\u003c!-- ![PyPI - Downloads](https://img.shields.io/pypi/dm/npnn) --\u003e\n\n\n## What's npnn?\n\u003e `npnn` is a a **torch-like** Python module for **gradient descent based machine learning** implemented with `numpy`. \n\n### Dependency\nBasically `npnn` only depends on `numpy`(the latest version 1.26.4 is verified).\n\nIf you have CUDA devices available, then you can easily get a acceleration by installing suitable version of `cupy`.  In this case `npnn` will use `cupy` api rather than `numpy` api.\n\nFor example, my PC have CUDA v12.x (x86_64), so I use command:\n```bash\npip install cupy-cuda12x\npip install npnn\n```\nor in short:\n```bash\npip install npnn[cuda12x]\n```\ncheck [cupy documentation](https://docs.cupy.dev/en/stable/install.html#installing-cupy) for more information.\n\n\n### API references\n\nSee [npnn WIKI](https://github.com/AIboy996/npnn/wiki).\n\n### Known issues\n\nSee [npnn known-issues](https://github.com/AIboy996/npnn/wiki#known-issues).\n\n## Work with npnn!\n\u003e Here we will construct a image classification neural network with npnn.\n\nBTW, this is a course assignment of *DATA620004, School of Data Science, Fudan University*.\n\n### Task\nConstruct and Train a neural network on [Fashion-MNIST](https://github.com/zalandoresearch/fashion-mnist) to do image classification.\n\n- Implement gradient backpropagation algorithm by hand,you can use `numpy` but **DO NOT** use `pytorch` or `tensorflow` to do autograd.\n\n- Submit source code including at least four parts: `model definition`, `training`, `parameters searching` and `testing`.\n\n### Implementation\n\n- `dataset.py`: provide Fashion MNIST dataset\n- `model.py`: model definition\n- `train.py`: model training\n- `search.py`: parameters searching\n- `test.py`: model testing\n- `viz.py`: visualization\n- `utils.py`: some misc function, such as `save_model`\n\nrun `search.py`, you can get a table like:\n\nno|train_id|accuracy|hidden_size|batch_size|learning_rate|regularization|regular_strength\n--|--|--|--|--|--|--|--\n0|2024_0423(1713841292)|0.8306|[384]|3|0.002|None|0.0\n1|2024_0423(1713845802)|0.8145|[384]|3|0.002|l2|0.1\n2|2024_0423(1713849349)|0.8269|[384]|3|0.002|l2|0.01\n3|2024_0423(1713853939)|0.8255|[384]|3|0.002|l2|0.005\n4|2024_0423(1713857657)|0.8373|[384]|3|0.002|l2|0.001\n\ntrain log file and saved model weights can be found in `./logs` and `./checkpoints` folder.\n\n### Experiments\n\nSee [report.ipynb](report.ipynb) or more readable version: [report.pdf](report.pdf).\n\n## LICENSE\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faiboy996%2Fnpnn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faiboy996%2Fnpnn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faiboy996%2Fnpnn/lists"}