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
          / \
         /   \
   IN > o--o--o--o > OUT
         \   /
          \ /

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

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

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

  • $\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
    Feb 5 '16 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$ Feb 5 '16 at 11:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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