can i convert ANN model to C++ code?

3 views (last 30 days)
CL P
CL P on 5 Nov 2023
Answered: CL P on 13 May 2024
Dear Expert,
I want to convert or create the ANN model to C++ code file. I develpoed a ANN model that predict one output correspondin to some input, so we have weight, bias, network and input parameters. could you suggest me how can i convert this ANN model to C++ code so that we can use this code or couple it in the other software like fluent.
Please let me know what is the step or procedure or any idea so that we can convert it,

Answers (2)

Harsh
Harsh on 10 May 2024
Hi,
From what I understand, you're looking to generate C++ code for an Artificial Neural Network (ANN) model. MATLAB Coder allows generation of code for pretrained networks such as ResNet-50, VGG16, etc. However, it's important to note that, currently, their selection is limited to Convolutional Neural Networks (CNNs) only.
While it's possible to create ANNs in MATLAB by manually adding and adjusting layers within a network, MATLAB Coder does not yet support code generation for custom models.
For more information on all the pretrained networks available in MATLAB, please refer to the following link:
I hope this information is helpful. Thank you!

CL P
CL P on 13 May 2024
@Harsh Thank you for your reply, i do not understand, could you please desribed by an exmple which give weight and bias.

Community Treasure Hunt

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

Start Hunting!