alexredd99 / EmbHD

A library for training and running HDC models on embedded devices.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Embedded HDC Library

A library for training and running HDC models on embedded devices. Currently hardware optimized for ARM Cortex-M4.

scripts/export_matrix.py allows you to export a binary hyperspace to a C header file to be included in your main.c. The syntax is as follows:

python3 export_matrix.py {TYPE} {DIM} {ROWS} {NAME}

Where TYPE should be either 'r' for random, 'l' for level, or 'c' for circular. DIM and ROWS should be integers corresponding to the dimension and number of hypervectors in the hyperspace respectively. NAME is the name of the hyperspace and also the name of the Matrix variable generated by the script. The script will write the header file to STDOUT, so you must redirect the output to a header file. Here's an example usage:

python3 export_matrix.py r 10000 784 my_random > my_random.h

Building

Currently only builds a library 'libmatrix.a' that you have to link in your project. In future, will have ARCH argument for different platforms.

Notes

Many operations on integers other than 8-bit still unimplemented.

About

A library for training and running HDC models on embedded devices.


Languages

Language:C 74.9%Language:Python 19.1%Language:Makefile 6.0%