How can I compile a pre-trained neural network into a standalone application using the MATLAB Compiler 4.10 (R2009a)?
<http://www.mathworks.com/products/compiler/compiler_support.html>
clc clear all close all P = [1 2 3 4 5]; T = [1 2 3 4 3]; net = newff(P,T,5); net.trainParam.epochs = 50; net = train(net,P,T); save pre_trained_net net
The following function utilizing the pre-trained network can be compiled into a stand-alone application:
function compiled_network(input) % Include Neural Network Toolbox dependencies. % web([docroot '/toolbox/compiler/function.html']) %#function network % Load data. load pre_trained_net if ischar(input) input=str2num(input); end output = sim(net,input) plot(input,output,'o')
The following command may be used to compile the above function into a stand-alone application:
mcc -m compiled_network
The compiled application may be called from the system command line as follows to generate output for new input:
compiled_network([1,2,3,4,5])
For your convenience, find attached 'pre_trained_net.mat' and 'compiled_network.exe'. The executable was compiled using MATLAB Compiler 4.10 (R2009a) on Windows XP. These files can always be created as described earlier.
Matlabsolutions.com provides guaranteed satisfaction with a
commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain
experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support
to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been
empanelled after extensive research and quality check.
Matlabsolutions.com provides undivided attention to each Matlab
assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services
include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work
done at the best price in industry.