当前位置: X-MOL 学术Eng. Appl. Artif. Intell. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Keras2c: A library for converting Keras neural networks to real-time compatible C
Engineering Applications of Artificial Intelligence ( IF 7.5 ) Pub Date : 2021-02-12 , DOI: 10.1016/j.engappai.2021.104182
Rory Conlin , Keith Erickson , Joseph Abbate , Egemen Kolemen

With the growth of machine learning models and neural networks in measurement and control systems comes the need to deploy these models in a way that is compatible with existing systems. Existing options for deploying neural networks either introduce very high latency, require expensive and time consuming work to integrate into existing code bases, or only support a very limited subset of model types. We have therefore developed a new method called Keras2c, which is a simple library for converting Keras/TensorFlow neural network models into real-time compatible C code. It supports a wide range of Keras layers and model types including multidimensional convolutions, recurrent layers, multi-input/output models, and shared layers. Keras2c re-implements the core components of Keras/TensorFlow required for predictive forward passes through neural networks in pure C, relying only on standard library functions considered safe for real-time use. The core functionality consists of 1500 lines of code, making it lightweight and easy to integrate into existing codebases. Keras2c has been successfully tested in experiments and is currently in use on the plasma control system at the DIII-D National Fusion Facility at General Atomics in San Diego.



中文翻译:

Keras2c:用于将Keras神经网络转换为实时兼容C的库

随着测量和控制系统中机器学习模型和神经网络的增长,需要以与现有系统兼容的方式部署这些模型。用于部署神经网络的现有选项要么引入了很高的延迟,要么需要昂贵且耗时的工作才能集成到现有的代码库中,要么仅支持非常有限的模型类型子集。因此,我们开发了一种称为Keras2c的新方法,该方法是用于将Keras / TensorFlow神经网络模型转换为实时兼容C代码的简单库。它支持广泛的Keras层和模型类型,包括多维卷积,递归层,多输入/输出模型和共享层。Keras2c重新实现了Keras / TensorFlow的核心组件,这些组件需要纯C语言中的神经网络通过神经网络进行预测性前向传递,仅依赖于对实时使用安全的标准库函数。核心功能包括1500代码行,使它轻巧且易于集成到现有代码库中。Keras2c已在实验中成功测试,目前已在圣地亚哥General Atomics的DIII-D国家融合中心的血浆控制系统上使用。

更新日期:2021-02-12
down
wechat
bug