{"id":22369857,"url":"https://github.com/jakson-almeida/rnn-cpp","last_synced_at":"2026-05-06T11:34:53.527Z","repository":{"id":264401429,"uuid":"893270435","full_name":"Jakson-Almeida/RNN-Cpp","owner":"Jakson-Almeida","description":"This Neural Networks library was designed to be lightweight and efficient, making it ideal for embedded systems.","archived":false,"fork":false,"pushed_at":"2025-01-03T16:57:27.000Z","size":69,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-12T04:43:50.754Z","etag":null,"topics":["arduino","arduino-library","cpp-library","deeplearning","esp32","neural-network","recurrent-neural-networks"],"latest_commit_sha":null,"homepage":"","language":"C++","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/Jakson-Almeida.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":"2024-11-24T01:19:00.000Z","updated_at":"2025-06-01T02:05:16.000Z","dependencies_parsed_at":"2024-11-24T02:23:39.358Z","dependency_job_id":"b3e4a557-f0b7-427a-935e-bd78b10eb9ba","html_url":"https://github.com/Jakson-Almeida/RNN-Cpp","commit_stats":null,"previous_names":["jakson-almeida/rnn-c-"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Jakson-Almeida/RNN-Cpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jakson-Almeida%2FRNN-Cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jakson-Almeida%2FRNN-Cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jakson-Almeida%2FRNN-Cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jakson-Almeida%2FRNN-Cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jakson-Almeida","download_url":"https://codeload.github.com/Jakson-Almeida/RNN-Cpp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jakson-Almeida%2FRNN-Cpp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32692058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T08:33:17.875Z","status":"ssl_error","status_checked_at":"2026-05-06T08:33:17.221Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["arduino","arduino-library","cpp-library","deeplearning","esp32","neural-network","recurrent-neural-networks"],"created_at":"2024-12-04T19:29:29.291Z","updated_at":"2026-05-06T11:34:53.488Z","avatar_url":"https://github.com/Jakson-Almeida.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Recurrent Neural Network Library (C++)\n\nWelcome to the **Recurrent Neural Network Library**, an open-source project written entirely in C++ for implementing and testing Recurrent Neural Networks (RNNs) on resource-constrained environments like microcontrollers (e.g., Arduino and ESP32). This library was designed to be lightweight and efficient, making it **ideal for embedded systems with limited memory**.\n\n## Key Features\n\n**Pure C++ Implementation:** All linear algebra and matrix calculations were implemented from scratch, without the use of third-party libraries.\n**Dynamic Memory Management:** The library automatically deallocates unused memory, optimizing its use in devices with limited resources.\n\n## Customizable Architecture:\n\n- Supports N inputs and M outputs.\n- Can be configured as a deep network with up to N layers.\n- For each layer, M temporal (recurrent) layers can be added, enabling memory and recurrent functionalities.\n\n\n## Supported Activation Functions:\n\n- Sigmoid\n\n- ReLU\n\n\n## External Training: \n\nThe training process is external to the network. An example neural network was trained using the Particle Swarm Optimization (PSO) algorithm.\n\n\n## Example Usage\n\nHere’s an example of how to set up, configure, and use the library:\n\n```c++\n#include \u003ciostream\u003e\n#include \u003ciomanip\u003e\n#include \u003ccmath\u003e\n#include \"Neural_Network.h\" // Include your library header\n\nfloat *out;\nint deepLearning[]   = {2, 10, 10, 2};\nint temporalLayers[] = {2, 1, 0, 0};\nfloat vet[] = {1, -1};\n\nint main()\n{\n    int TAM = sizeof(deepLearning) / sizeof(int);\n    int tamVet = sizeof(vet) / sizeof(float);\n    Neural_Network neuron(deepLearning, temporalLayers, TAM);\n    Matrix weightsAndBias(neuron.getVetValuesLength(), 1);\n    Matrix vetEntrance(tamVet, 1);\n    \n    for(int i = 0; i \u003c weightsAndBias.getNumLinhas(); i++)\n        weightsAndBias.set(i, 0, i * 0.3 - 3);\n    \n    neuron.updateValues(weightsAndBias);\n    vetEntrance.updateValues(vet, tamVet);\n    neuron.updateEntrance(\u0026vetEntrance);\n    neuron.feedforward();\n    out = neuron.getOutputVet();\n\n    std::cout \u003c\u003c std::fixed \u003c\u003c std::setprecision(2);\n    std::cout \u003c\u003c \"First Output:\" \u003c\u003c std::endl;\n    std::cout \u003c\u003c \"v1 = \" \u003c\u003c out[0] \u003c\u003c std::endl;\n    std::cout \u003c\u003c \"v2 = \" \u003c\u003c out[1] \u003c\u003c std::endl \u003c\u003c std::endl;\n\n    std::cout \u003c\u003c \"Second Output:\" \u003c\u003c std::endl;\n    vet[0] = 0;\n    vet[1] = 0;\n    vetEntrance.updateValues(vet, tamVet);\n    neuron.updateEntrance(\u0026vetEntrance);\n    neuron.feedforward();\n    std::cout \u003c\u003c \"v1 = \" \u003c\u003c neuron.getOutput(0) \u003c\u003c std::endl;\n    std::cout \u003c\u003c \"v2 = \" \u003c\u003c neuron.getOutput(1) \u003c\u003c std::endl;\n\n    return 0;\n}\n```\n\n\n## Installation\n\nClone the repository into your project:\n\n``` bash\ngit clone https://github.com/Jakson-Almeida/RNN-Cpp.git\n```\n\nInclude the necessary header files in your C++ project, and you’re ready to go.\n\n## Requirements\n\nThis library was built using only the following standard C++ headers:\n\n```c++\n#include \u003ciostream\u003e\n#include \u003ciomanip\u003e\n#include \u003ccmath\u003e\n```\n\nIt does not depend on any external libraries, ensuring portability and simplicity.\n\n## Applications\n\n- **Embedded Systems:** The library is optimized for use on microcontrollers such as Arduino and ESP32.\n\n- **Lightweight AI Prototyping:** Test recurrent neural networks in environments with limited resources.\n\n- **Custom AI Architectures:** Easily define custom deep and recurrent layers for a wide variety of use cases.\n\n\n# Author\n\nThis library was developed by Jakson-Almeida, with all linear algebra and matrix operations implemented from scratch. The design ensures flexibility and efficiency for low-memory environments.\n\n# Contribution\n\nContributions are welcome! Feel free to open issues or submit pull requests to improve the library. Let’s make lightweight neural networks accessible to everyone.\n\n# License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakson-almeida%2Frnn-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjakson-almeida%2Frnn-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakson-almeida%2Frnn-cpp/lists"}