Matlab function and derived .Net dll are returning different results

36 次查看(过去 30 天)
I have generated a .dlnetwork (based on yamnet) on Matlab 2024a and used it inside a function. Then I have generated a .Net dll from this function. When I give same input to both function and .Net code which calls corresponding .dll they return totally different results.
Actually, the result of the funtion is always as I expected. Therefore, I think something goes wrong in the .Net environment. But code is runing well with no warning or exception.
  1 个评论
Steven Lord
Steven Lord 2024-8-6,18:54
It's probably going to be difficult if not impossible to offer any concrete guidance without more information.
  • What are the inputs to the function in MATLAB (both what do they represent/how are they used and potentially what actual values are you passing into the function)?
  • How are you deploying your function to .NET? The documentation states there are (at least, I'm not that familiar with the .NET deployment functionality) two different options.
  • How are you invoking the .NET assembly in your .NET code? Showing exactly what you're passing in (type and value) would be helpful.
  • How different is "totally different"? Are we talking about an error near floating-point roundoff or are we talking many, many orders of magnitude greater than that?
I suspect that it would probably be easier to debug if you contact Technical Support directly using this link, show them the exact code you're running, and work with them to determine the cause of the difference in the results.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Getting Started with Microsoft .NET 的更多信息

产品


版本

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by