MATLAB: Neural Networks Functions Convert to C++ codes

ccode generationDeep Learning Toolboxmatlab coderneural networks

*Hi All,
I am using the Neural Networks Toolbox to design and test the Neural Networks implementations. However, the Matlab codes does not suffice the speed and memory requirement of a very large networks (with 100,000+ neurons). I am exploring ways to convert the Matlab Neural Networks implementations to C++ implementations. Can the Codes Generation Toolbox help me to do that? Has anyone tried to convert the Matlab Neural Network codes to C++ before?
I converted the Feedforward Network and the trainlm() for Back Propagation algorithm to Visual C++ implementations 9 years ago by hand. That took me 2 full days of work. And the C++ codes was about 10 to 30 times faster and used 1/5 of the memory than the Matlab implementations.
However, with much more complexed networks like the NARX with Conjugate Gradient training algorithms, I think the codes would be much much more complicated than the LM and Feedforward networks that I converted years back. So, I think it would only be practical to utilize the Coder Generation Toolbox to achieve the Matlab to C++ codes convertion.
Appreciate in advance for your inputs in this topic. Meanwhile, I am happy to share with you any progress that I might make along the way.
Thanks,
Baker Huang*

Best Answer

Hi,
the MATLAB Coder won't help you here since the Neual Network Toolbox is not supported for code generation:
Or if you have some specific function in mind:
So seems like you have to start writing from the scratch again.