manaully remake neural network from example

2 views (last 30 days)
soepblik
soepblik on 2 Dec 2020
Edited: soepblik on 8 Dec 2020
Hi,
i am trying to manually calculate the output values for the neural network which is made in this example: https://nl.mathworks.com/help/comm/ug/training-and-testing-a-neural-network-for-llr-estimation.html. (the Network for the 16-QAM).
it has 2 inputs, 1 hidden layer with 8 neurons and an output layer with 4 neurons.
I try to calculate the output values manually. But i get different results than the calculated values from the script.
My script now:
w1 = net.IW{1} %the input-to-hidden layer weights
w2 = net.LW{2} %the hidden-to-output layer weights
b1 = net.b{1} %the input-to-hidden layer bias
b2 = net.b{2} %the hidden-to-output layer bias
% Layer 1
a1 = tansig(repmat(b1,1,size(x,2)) + w1*x);
% output
n=repmat(b2,1,size(x,2)) + w2*a1;
output= purelin(n);
What am i doing wrong or what do i forget in my calculation to get the correct values?
thanks in advance!
  1 Comment
soepblik
soepblik on 8 Dec 2020
someone that could help?
it has 1 hidden layer with relu activation
and the output layer has a pure linear activation.

Sign in to comment.

Answers (0)

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!