The project as a whole aims to build some small interactive playgrounds that use different AI techniques. At the moment, it only supports handwritten digits recognition and chess, but I intend to add more projects later.
This is a high-performant deep learning library made in Rust, that uses GPU shaders and CPU parallelization to speed up computations. It's built almost from scratch and uses ndarray for n-dimensional arrays and vulkano for GPU integration. It uses a more functional approach (with centralized storage of parameters in a map), supporting:
- Convolution layer
- Selective caching (used to skip almost 85% of the calculations)
- Max pool layer
- Dense layer
- Dropout layer
- Other utility layers
- ReLu, Tanh and Sigmoid activation functions
- Cross entropy and Mse loss functions
- Adam learning optimizer
The ones in bold are GPU-accelerated
A trained AI model can be represented in 3 files:
- A binary file containing all parameters
- A JSON file containing some info
- A simple XML file defining the structure. All the types are defined here. For example:
<AIModel>
<LossFunc><CrossEntropy/></LossFunc>
<Layer>
<Sequential>
<Convolution in_channels="1" out_channels="32" kernel_size="5" stride="1" padding="2">
<KernelsLr>
<Adam/>
</KernelsLr>
</Convolution>
<Relu/>
<MaxPool size="2" stride="2"/>
{...}
</Sequential>
</Layer>
</AIModel>
Most of the time, changing the structure (adding or removing layers) does not lose any training progress.
A single page app built using SolidJs and Vite to allow users to interact with the playground in any device. It's hosted in GitHub Pages and supports translations to English and Portuguese.
Simple server built with warp to evaluate client requests using the trained models, and manage AI versions (snapshots after a number of training epochs) and config files. It's hosted in Azure, as a container mounted in a File Share.
Basic program to locally train a specific model and upload the results to versions_server.