{"id":16517346,"url":"https://github.com/vietanhdev/neural-network-from-scratch","last_synced_at":"2026-05-28T23:31:26.227Z","repository":{"id":79024516,"uuid":"295786030","full_name":"vietanhdev/neural-network-from-scratch","owner":"vietanhdev","description":"AI From Scratch in C++ - for educational purposes. Available now: Fully Connected Network and Convolution Neural Network.","archived":false,"fork":false,"pushed_at":"2020-09-28T04:58:01.000Z","size":58,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-02T19:33:03.584Z","etag":null,"topics":["ai","cnn","cpp","from-scratch","neural-network","nlp"],"latest_commit_sha":null,"homepage":"","language":"C++","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/vietanhdev.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":"2020-09-15T16:26:03.000Z","updated_at":"2024-10-29T16:31:00.000Z","dependencies_parsed_at":"2023-06-02T21:45:10.611Z","dependency_job_id":null,"html_url":"https://github.com/vietanhdev/neural-network-from-scratch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vietanhdev/neural-network-from-scratch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vietanhdev%2Fneural-network-from-scratch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vietanhdev%2Fneural-network-from-scratch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vietanhdev%2Fneural-network-from-scratch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vietanhdev%2Fneural-network-from-scratch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vietanhdev","download_url":"https://codeload.github.com/vietanhdev/neural-network-from-scratch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vietanhdev%2Fneural-network-from-scratch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33630999,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"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":["ai","cnn","cpp","from-scratch","neural-network","nlp"],"created_at":"2024-10-11T16:30:01.139Z","updated_at":"2026-05-28T23:31:26.204Z","avatar_url":"https://github.com/vietanhdev.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI From Scratch\n\n**[WORK IN PROGRESS...]** This source code has been started recently, and It's still actively improved everyday. Feel free to help with any pull request.\n\n**Motivation:** I started this project to build an artifical intelligence library from scratch for educational purpose. By that way, I want to understand clearly about AI algorithms (especially machine learning, deep learning) and practice C++ programming. I made this source code public with the hope that it can help others in understanding AI. I also look forward to your comments and suggestions to improve my source code. You can contact me directly using [this contact form](https://aicurious.io/contact).\n\nThis source code depends on **[Armadillo](http://arma.sourceforge.net/)** and **[OpenMP](https://www.openmp.org/)** to optimize matrix calculation.\n\n## I. Suppported Layers\n\nSupported layers (Documentation will be available soon).\n\n- Fully connected\n- Dropout\n- ReLU\n- Sigmoid\n- Softmax\n- Max pooling\n- Convolutional (no padding)\n\n## II. Examples\n\n### 1. XOR Calculator\n\n### 2. MNIST Digit Classification (using LeNet)\n\n- Dataset: Download following dataset and extract `train.csv`, `test.csv` into `data/MNIST`.\n\nhttps://www.kaggle.com/c/digit-recognizer/data\n\n### 3. Wine Quality Estimator\n\n- Dataset: Download following dataset and extract all files into `data/WineQuality`. You also need to open `winequality-red.csv` and replace all semicolon (`;`) with comma (`,`). This file will be used for Wine Quality Estimator example.\n\nhttps://archive.ics.uci.edu/ml/datasets/wine+quality\n\n## III. Setup and Run\n\n### Environment\n\nMy source code was tested with Ubuntu 18.08. However, it also should work on other operating systems without problem.\n\n- **Dependencies:** Armadillo (for matrix computation), OpenCV, CMake.\n\n- Install `armadillo`:\n\n```\nsudo apt install libopenblas-dev liblapack-dev\nwget http://sourceforge.net/projects/arma/files/armadillo-9.880.1.tar.xz\ntar -xvf armadillo-9.880.1.tar.gz\ncd armadillo-9.880.1\n./configure\nmake\nsudo make install\n```\n\n- Install OpenCV:\n\n```\nsudo apt intall libopencv-dev\n```\n\n### Compile and Run\n\n- Compile:\n\n```\nmkdir build\ncd build\ncmake ..\nmake\n```\n\n- Run Wine Quality Estimator:\n\n```\n./wine_quality_estimator\n```\n\n## IV. References\n\n- http://www.cs.virginia.edu/~vicente/vislang/notebooks/deep_learning_lab.html\n- https://cs231n.github.io/optimization-2/","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvietanhdev%2Fneural-network-from-scratch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvietanhdev%2Fneural-network-from-scratch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvietanhdev%2Fneural-network-from-scratch/lists"}