embARC Machine Learning Inference Library
This repository contains source code of embARC Machine Learning Inference Library (embARC MLI Lib), examples and documentation.
- Preliminary version 0.5
- This release supports following functional primitives
- 2D Convolution
- 2D depthwise convolution
- Fully Connected layer
- Max and average pooling
- LSTM, Basic RNN
- Elementwise (add, sub, mul, min, max)
- Data manipulation (concatanation, permute, 2D padding)
- ReLU, Leaky ReLu, ReLu1, ReLu6
- Softmax, Sigmoid, ThanH
- Supported data layout CHW (Channel-Height-Width standard for Caffe)
./bin - directory holder for embARC MLI library and samples binaries created during build
./build - contains common build rules
./doc - contains the API documentation of the embARC MLI library ./include - include files with API prototypes and types
./lib/src - source code of embARC MLI Library
./examples - source code of examples
./examples/example_cifar10_caffe - example illustrating implementation of CIFAR10 Caffe
./examples/example_har_smartphone - example illustrating implementation of Human Activity Recognition
./examples/auxilary - source code of helper functions used for the examples
./hw - contains HW templates (*.tcf files)
Building and quick start
By default embARC MLI Library can be build for /hw/em9d.tcf which is based on the standard EM9D Voice Audio template, defined in MetaWare Development Tools, with extended XY memory. embARC MLI Library can be also built for a specific EM or HS configuration.
- MetaWare Development tools 2018.12 or later
Building of embARC MLI library
- Open command line and change working directory to './lib/make/'
- Start building 'gmake TCF_FILE=../../hw/em9d.tcf'
Open command line and change working directory to './examples/example_cifar10_caffe/'
Build CIFAR10 example 'gmake TCF_FILE=../../hw/em9d.tcf'
Run CIFAR10 example 'gmake run TCF_FILE=../../hw/em9d.tcf'
Result Quality shall be "S/N=3638.6 (71.2 db)"
Open command line and change working directory to './examples/example_har_smartphone'
Clean old build artifacts of the application (this will not clean the lib) 'gmake clean'
Build HAR example. 'gmake TCF_FILE=../../hw/em9d.tcf'
Run HAR example. 'gmake run TCF_FILE=../../hw/em9d.tcf'
Result Quality shall be "S/N=1823.9 (65.2 db)"