What is the best way to deploy a trained neural network as an FMU for co-simulation? #2152
|
I have a trained feedforward neural network (built in PyTorch) that serves as a surrogate model for a physical component and it is available in ONNX. My questions Is there a recommended toolchain for converting a trained ONNX model into a standalone C/C++ FMU without embedding a full inference runtime? (e.g., ONNX-to-C code generators) Any guidance on best practices, toolchains, or pitfalls would be greatly appreciated. |
Replies: 1 comment
|
There are several ways to deploy ONNX NNs as FMUs, including some in-House solutions that I cannot share here. Here are some publicly available ways to do it:
Please note that with CS-FMUs you will get a timestep delay (if you are not in event mode in FMI 3.0 FMUs), so perhaps ME FMUs would be more suitable for static models. |
There are several ways to deploy ONNX NNs as FMUs, including some in-House solutions that I cannot share here.
Here are some publicly available ways to do it:
Please note th…