Transfer deep learning model to FMU #164
Replies: 2 comments 4 replies
-
I can't help much. There are alot if things that can go wrong when importing into a tool like dymola. You don't say what failed or if you got an error. Numpy has caused issues in the past. Dymola might load Python on it's own which might cause issues. Especially on Linux. Your code looks fine except for the fact that you load the network from file at each iteration, which I guess would lead to some performance issues. (You seem to use absolute path for the file which is fine if you run this on the same PC as you exported the model). You could also use lambdas to write into an array rather than declaring all these instance variables. I would start debugging in another tool to see if Dymola is the issue. |
Beta Was this translation helpful? Give feedback.
-
After one day's hard work, I have solved most problems. Still one question hope you can answer. |
Beta Was this translation helpful? Give feedback.
-
Hello! @markaren
I really appreciate your work in building an FMU from python code! That is quite helpful for me!
I have learned your example and successfully export ’SympySlave.fmu‘ and 'Resistor.fmu' and use it for simulation.
I am trying to make my already trained deep learning model as an FMU and import it to other software. However, I can't correctly rewriter my code.
I am wondering if you could help me with this? Could I write my simple code below and take you several minutes to rewrite it to the right form and generate FMU?
Thank you very much for your kind consideration and I am looking forward to your early reply :)
Beta Was this translation helpful? Give feedback.
All reactions