{"id":30900474,"url":"https://github.com/teleprint-me/mlp.cpp","last_synced_at":"2025-09-09T05:25:15.443Z","repository":{"id":311401861,"uuid":"1043592593","full_name":"teleprint-me/mlp.cpp","owner":"teleprint-me","description":"A multi-layer perceptron.","archived":false,"fork":false,"pushed_at":"2025-09-08T02:32:14.000Z","size":366,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-08T02:35:08.141Z","etag":null,"topics":["cpp","multilayer","network","neural","perceptron"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teleprint-me.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-24T07:34:38.000Z","updated_at":"2025-09-08T02:32:18.000Z","dependencies_parsed_at":"2025-08-24T14:22:19.086Z","dependency_job_id":"7c76e2dd-de02-4a26-8816-b07279815acf","html_url":"https://github.com/teleprint-me/mlp.cpp","commit_stats":null,"previous_names":["teleprint-me/mlp.cpp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/teleprint-me/mlp.cpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teleprint-me%2Fmlp.cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teleprint-me%2Fmlp.cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teleprint-me%2Fmlp.cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teleprint-me%2Fmlp.cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teleprint-me","download_url":"https://codeload.github.com/teleprint-me/mlp.cpp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teleprint-me%2Fmlp.cpp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274249150,"owners_count":25249387,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"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":["cpp","multilayer","network","neural","perceptron"],"created_at":"2025-09-09T05:25:13.293Z","updated_at":"2025-09-09T05:25:15.427Z","avatar_url":"https://github.com/teleprint-me.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mlp\n\nA multi-layer perceptron.\n\n## Dependencies\n\n- g++\n- gdb\n- cmake\n- clangd\n- clang-format\n- clib\n- libmath\n- openmp\n\n## Setup\n\n```sh\ngit clone https://github.com/teleprint-me/mlp.cpp mlp\ncd mlp\n```\n\n## Build\n\n### Debug\n\n```sh\ncmake -B build -DCMAKE_BUILD_TYPE=Debug\n```\n\n### Release\n\n```sh\ncmake -B build -DCMAKE_BUILD_TYPE=Release\n```\n\n### Compile\n\n```sh\ncmake --build build -j 16\n```\n\n### Model Checkpoints\n\n```sh\nmkdir models\n```\n\n## XOR Gate\n\nThe XOR gate is a canonical non-linear test bed—an ideal problem for\nmulti-layer perceptrons.\n\nThere are three binaries for the XOR model:\n\n- `train`: Train an XOR model from scratch or resume from a checkpoint.\n- `inspect`: View model dimensions and internal state.\n- `inference`: Run predictions using a trained model.\n\nExecutables are located in `./build/xor`.\n\n### Training\n\n- To train from scratch:\n\n```sh\n./build/xor/xor_train\n```\n\n- To resume from an existing checkpoint:\n\n```sh\n./build/xor/xor_train --ckpt xor-latest.bin\n```\n\n- For available options:\n\n```sh\n./build/xor/xor_train -h\n```\n\n#### Organizing Checkpoints\n\nTo group checkpoints in a directory:\n\n```sh\n./build/xor/xor_train --ckpt models/xor-latest.bin\n```\n\n### Inspect\n\n```sh\n./build/xor/xor_inspect --ckpt xor-latest.bin\n```\n\n### Inference\n\n```sh\n./build/xor/xor_inference --ckpt xor-latest.bin\n```\n\n## References\n\n- [1957 — The Perceptron: A probabilistic model for information storage and organization in the brain](https://archive.org/details/sim_psychological-review_1958-11_65_6/page/386/mode/2up?q=the+perceptron+rosenblatt+1957)\n- [1986 — Learning representations by back-propagating errors](https://www.semanticscholar.org/paper/Learning-representations-by-back-propagating-errors-Rumelhart-Hinton/052b1d8ce63b07fec3de9dbb583772d860b7c769)\n- [1989 — Multilayer feedforward networks are universal approximators](https://www.semanticscholar.org/paper/Multilayer-feedforward-networks-are-universal-Hornik-Stinchcombe/f22f6972e66bdd2e769fa64b0df0a13063c0c101)\n- [1998 — Gradient-based learning applied to document recognition](https://www.semanticscholar.org/paper/Gradient-based-learning-applied-to-document-LeCun-Bottou/162d958ff885f1462aeda91cd72582323fd6a1f4)\n- [2010 — Understanding the difficulty of training deep feedforward neural networks](https://www.semanticscholar.org/paper/Understanding-the-difficulty-of-training-deep-Glorot-Bengio/ea9d2a2b4ce11aaf85136840c65f3bc9c03ab649)\n- [2013 — On the importance of initialization and momentum in deep learning](https://www.semanticscholar.org/paper/On-the-importance-of-initialization-and-momentum-in-Sutskever-Martens/aa7bfd2304201afbb19971ebde87b17e40242e91)\n- [2016 — Deep Learning](https://www.deeplearningbook.org)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteleprint-me%2Fmlp.cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteleprint-me%2Fmlp.cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteleprint-me%2Fmlp.cpp/lists"}