Diwa: Tiny AI/ML Library
Diwa is a lightweight library providing a simple implementation of Feedforward Artificial Neural Networks (ANNs) for microcontrollers such as ESP32, ESP8266, RP2040, and similar development boards (specially boards with PSRAM); it is also compatible for desktop environments (Windows, MacOS, and Linux-based OSes), WebAssembly, and even PSP gaming consoles. It is designed for resource-constrained environments but can be used with non-Arduino platform projects, offering a streamlined solution for tasks that require neural network capabilities.
Diwa stands out as a straightforward and effective solution for implementing artificial neural networks on microcontrollers. Key features include:
- Lightweight: Designed for resource-constrained microcontroller environments yet can still be used within non-Arduino environments.
- Simple Implementation: Provides a basic yet effective implementation of a Feedforward ANN.
- Easy Integration: Suitable for microcontrollers like ESP8266, ESP32, and RP2040. Also compatible with desktop environments, WebAssembly, and even PSP gaming console.
- Training Support: Includes methods for training the neural network using backpropagation.
Note
Diwa is primarily intended for lightweight applications. For more intricate tasks, consider using advanced machine learning libraries on more powerful platforms.
See live demo on Wokwi.
Architecture/Platform Support
Diwa are tested on the following architecture/platform:
Arch/Platform | Remarks |
---|---|
✅ ESP32-WROOM ✅ ESP32-WROVER |
NodeMCU DevKit (Automatically using PSRAM available) |
✅ ESP8266 | Wokwi Emulation |
✅ RP2040 | Raspberry Pi Pico (RP2040) |
🔼 PSP | PPSSPP Emulator (Diwa::loadFromFile and Diwa::saveToFile not yet supported) |
✅ Desktop Environments | Works perfectly on Windows, MacOS, and Linux. |
✅ WebAssembly (WASM) | Tested via Emscripten |
Full Changelog: v0.0.7...v0.0.8