CodeJeNN: A simple C++ neural network generator for physics applications
Arcities, Jay, Popov, Pavel, Ching, Eric J, Viswanath, Kamal, Johnson, Ryan F
–arXiv.org Artificial Intelligence
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.
arXiv.org Artificial Intelligence
Oct-26-2026
- Country:
- North America > United States > California (0.28)
- Genre:
- Workflow (0.88)
- Research Report (0.65)
- Technology: