3
$\begingroup$

TLDR: Please help me understand the graph representation of the network in the image below.

Hi, this is pretty stupid, but I'm just have trouble visualising what I'm actually doing with this neural network.

I've read about neural networks and multilayer perceptrons for some time and I'm just getting started with actually using them. I started with a super simple example, just to get warmed up but now I've confused myself.

I artificially generated some data and used nntools in matlab to attempt to "predict" the results. I built a neural network with the following parameters:

  • feed forward backprop network.
  • Gradient Descent training algorithm.
  • Gradient Descent learniing algorithm.
  • Performance/loss function of mean squared error.
  • two layers:
    • first with three neurons and Tansig activation function.
    • the second with one neuron and linear activation.

I end up with something looking like this:

My network

However, I don't know what this actually represents, I'm all sorts of confused right now. Could someone please explain/upload an image/draw some ascii to represent the neurons and edges in the above network? It would really help clear my head.

Currently I think it's like this:

           T  L
           o
          / \
         /   \
   IN > o--o--o--o > OUT
         \   /
          \ /
           o

With linear activations in columns L and Tanh activations in columns T. Is that right? Doesn't make sense to me.

$\endgroup$
2
  • $\begingroup$ That first L column shouldn't be there. Your input goes directly to the first hidden layer. $\endgroup$
    – TBSRounder
    Commented Feb 1, 2016 at 19:45
  • $\begingroup$ Editted it, is that what the nntools network represents? $\endgroup$
    – Ogaday
    Commented Feb 1, 2016 at 19:51

1 Answer 1

4
$\begingroup$

I believe this is the representation you're after, please excuse the rough sketch but I think it explains the structure appropriately.

  • Single input going to three hidden units, each with a bias and tansig activation.
  • The outputs of the hidden layer are summed (via linear activation) with a bias to produce the output.

enter image description here

$\endgroup$
2
  • $\begingroup$ I see the bias now, I didn't register that in the matlab diagram. This definitely helps me clarify what the matlab diagram means with its various symbols. Thank you! $\endgroup$
    – Ogaday
    Commented Feb 5, 2016 at 11:20
  • 1
    $\begingroup$ No problem. I find it is sometimes useful (especially when coding your own) to simply think of the bias as an additional input which is equal to 1. $\endgroup$ Commented Feb 5, 2016 at 11:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.