How to manually implement of Feed Forward Neural Network processing functions?
Show older comments
I am trying to implement a feed forward neural network created by Matlab nftool on Arduino board.
When I did that all results were incorrect.
I recognized that I did not include preprocessing functions in the implementation so I decided to try to implement the network in Matlab M file first before implementation on Arduino to make sure of my work.
The neural network script contains the following two lines of codes:
net.inputs{1}.processFcns = {'removeconstantrows','mapminmax'};
net.outputs{2}.processFcns = {'removeconstantrows','mapminmax'};
I changed those lines to the following:
net.inputs{1}.processFcns = {};
net.outputs{2}.processFcns = {};
to have a network without Pre/Post-Processing Functions.
In training I implemented the processing function (mapminmax) for the input and target data using the following equation:
y = (ymax-ymin)*(x-xmin)/(xmax-xmin) + ymin; where ymax=1 and ymin=-1
I neglected the removeconstantrows processing function.
When I used this network the results were very close but not exactly the same.
So I need to know what is the problem in the implementation of processing function because this is the only part I changed.
Thank you very much in advance.
2 Comments
Greg Heath
on 2 Aug 2015
What does "results" mean ???
Please be very specific so that this doesn't have to be an unnecessarily long interactive post.
If you have to, post relevant code.
Greg
Hatem Elattar
on 11 Aug 2015
Answers (1)
Greg Heath
on 5 Aug 2015
0 votes
Your normalization equation incorrect. There are separate normalization equations for the input x and target t which I'm sure you can derive.
The resulting normalized output yn is unnormalized using tmin and tmax.
You may also want to check the codes using the HELP, DOC and TYPE commands.
Hope this helps.
Thank you for formally accepting my answer
Greg
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!