CodeJeNN: A simple C++ neural network generator for physics applications
Abstract
Machine learning has shown promise for physics applications, but integrating Python-based libraries into high-performance C++ solvers can create performance bottlenecks. We present CodeJeNN, which addresses this gap by auto-generating self-contained C++ code from trained Keras models for inference. This eliminates external dependencies through inlined functions, allowing seamless integration into existing frameworks. We describe the Keras-to-C++ workflow, supported architectures, and limitations. CodeJeNN is demonstrated through inference benchmarks against Keras (eager and optimized) and a computational fluid dynamics (CFD) simulation of a hydrogen-air mixing layer in which viscosity is modeled using a neural network, showing that the generated models integrate directly into a solver while remaining efficient and accurate.
Related
- Identification of effective transport physics and optimal feedback control: Experimental demonstration on a 1600-fan wind generator
- CGC-py: A Monte Carlo Event Generator for Gluon Saturation Physics
- Hierarchical emergence of network bursting in a four-cell central pattern generator model
- Time-temperature superposition from multi-temperature chirp rheometry of thermorheologically simple materials via physics-informed Gaussian processes
- PINNIES: An efficient physics-informed neural network framework for integral operator problems
BibTeX
@misc{arcities2026codejenn,
title = {{CodeJeNN: A simple C++ neural network generator for physics applications}},
author = {Jay Arcities and Pavel Popov and Eric J Ching and Kamal Viswanath and Ryan F Johnson},
howpublished = {arXiv},
year = {2026},
month = oct,
doi = {10.48550/arxiv.2607.02746},
eprint = {2607.02746},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2607.02746},
note = {CC0},
}
RIS
TY - UNPB
TI - CodeJeNN: A simple C++ neural network generator for physics applications
AU - Jay Arcities
AU - Pavel Popov
AU - Eric J Ching
AU - Kamal Viswanath
AU - Ryan F Johnson
PY - 2026
DA - 2026/10/22
PB - arXiv
DO - 10.48550/arxiv.2607.02746
UR - https://arxiv.org/abs/2607.02746
AB - Machine learning has shown promise for physics applications, but integrating Python-based libraries into high-performance C++ solvers can create performance bottlenecks. We present CodeJeNN, which addresses this gap by auto-generating self-contained C++ code from trained Keras models for inference. This eliminates external dependencies through inlined functions, allowing seamless integration into existing frameworks. We describe the Keras-to-C++ workflow, supported architectures, and limitations. CodeJeNN is demonstrated through inference benchmarks against Keras (eager and optimized) and a computational fluid dynamics (CFD) simulation of a hydrogen-air mixing layer in which viscosity is modeled using a neural network, showing that the generated models integrate directly into a solver while remaining efficient and accurate.
ER -