matlab神经网络工具箱
我使用 matlab 神经网络来训练一些数据,但我想在 C++ 程序中运行这个神经网络,该怎么做?
I used the matlab neural network to train on some data but I want to run this neural network in c++ program,how to do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以使用 ML 生成特征集(输入层),然后使用开源 C++ NN 实现来进行训练/分类。 (例如,http:// /takeinitiative.net/2008/04/23/basic-neural-network-tutorial-c-implementation-and-source-code/)如果你想使用 ML 进行训练并使用 C++ 进行分类,则不应该编写一些额外的代码来以 C++ 分类器可以读入的方式写出经过训练的网络太困难了。
You can use ML to generate your feature set (input layer) and then use an open source C++ NN implementation to do training/classification. (E.g., http://takinginitiative.net/2008/04/23/basic-neural-network-tutorial-c-implementation-and-source-code/) If you want to use ML to train and C++ to classify it shouldn't be too difficult to write some additional code to write out the trained network in a way that can be read in by the C++ classifier.
您可以使用 Matlab 编译器生成可嵌入到 C++ 应用程序中的代码
You can use the Matlab Compiler that generates code you can embed in your C++ application
我使用的是 Matlab R2013a。如果您仍然遇到此问题,请尝试查看
Matlab 目录中的此位置。我发现文件“yy.cpp”包含执行此操作的
mexFunction
。 Matlab很可能调用这个函数来模拟网络。似乎可以在稍微重构后将此功能集成到您的项目中。至少我打算这样做。 :-)
I'm using Matlab R2013a. If you are still facing with this issue, try to look at this location
inside Matlab directory. I found there file "yy.cpp" which contains
mexFunction
which does the thing. Very likely that Matlab calls this function to simulate network.Seems that it's possible to integrate this function into your project after slight refactoring. At least I plan to do so. :-)