Hier finden Sie wissenschaftliche Publikationen aus den Fraunhofer-Instituten.

A C Code Generator for Fast Inference and Simple Deployment of Convolutional Neural Networks on Resource Constrained Systems

: Urbann, Oliver; Camphausen, Simon; Moos, Arne; Schwarz, Ingmar; Kerner, Sören; Otten, Maximilian


Chakrabarti, S. ; Institute of Electrical and Electronics Engineers -IEEE-:
IEMTRONICS 2020, International IOT, Electronics and Mechatronics Conference. Conference Proceedings : Vancouver, Canada, 9th-12th September 2020, Online
Piscataway, NJ: IEEE, 2020
ISBN: 978-1-7281-9615-2
ISBN: 978-1-7281-9616-9
International IOT, Electronics and Mechatronics Conference (IEMTRONICS) <2020, Online>
Fraunhofer IML ()
machine learning; Code Generator; electronics; RCS

Inference of Convolutional Neural Networks in time critical applications usually requires a GPU. In robotics or embedded devices these are often not available due to energy, space and cost constraints. Furthermore, installation of a deep learning framework or even a native compiler on the target platform is not possible. This paper presents a neural network code generator (NNCG) that generates from a trained CNN a plain ANSI C code file that encapsulates the inference in single a function. It can easily be included in existing projects and due to lack of dependencies, cross compilation is usually possible. Additionally, the code generation is optimized based on the known trained CNN and target platform following four design principles. The system is evaluated utilizing small CNN designed for this application. Compared to TensorFlow XLA and Glow speed-ups of up to 11.81 can be shown and even GPUs are outperformed regarding latency.