Sim function giving different answer
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Omotayo Asiru
am 17 Sep. 2016
Bearbeitet: Greg Heath
am 17 Sep. 2016
I have trained a neural network with XOR gate using nprtool. I want to export it into my .net application. I used d sim function to simulate the network and it produced the expected result. However, the sim function does not work outside matlab so i need to write out the weights so i can use in my dotnet application. I wrote this function and tested it in matlab. The problem is that the function does not return same result as when i use sim function in matlab. Please i need help!!!
function [ Result ] = TrainedXOR_net(input )
load C:\Users\Student\Desktop\my_MatlabFiles\SampleXOR_Net.mat
y1 = tansig(net.IW{1}* input + net.b{1});
Result = tansig(net.LW{2}* y1 + net.b{2});
end
1 Kommentar
Greg Heath
am 17 Sep. 2016
Bearbeitet: Greg Heath
am 17 Sep. 2016
It's a common mistake responsible for many posts in both the NEWSGROUP and ANSWERS.
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Deep Learning Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!