Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'Some help w/ a generalized H for NNs?' topicStudent Support Forum > General > "Some help w/ a generalized H for NNs?"

< Previous CommentHelp | Reply To Comment | Reply To Topic
Author Comment/Response
Aaron Honecker
10/26/00 06:18am

>I'm trying to construct a generalized transfer function for a fully connected neural net. Basically I need to solve these equations for Y[n] in terms of X[n] and the (n+1) x (n+1) array [a] and I can't figure out how to go about it. I make use of the 1-d arrays wout and win but they should drop out if solved correctly. Any suggestions? Thanks!!
>wout[[i]] = win[[i]] g
>Y[n] = Sum[wout[j] a[[j,N+1]],{j,1,N}]
>win[i] = Sum[wout[j] a[[j,i]] + X[n] a[[N+1,i]],{j,1,N}]
>Here follows the notebook code I think (I'm new to this whole mathematica thing):
>\!\(wout\_\(\(\[LeftDoubleBracket]\)\(i\)\(\[RightDoubleBracket]\)\) =
> win\_\(\(\[LeftDoubleBracket]\)\(i\)\(\[RightDoubleBracket]\)\)\ g\)
>\!\(y[n]\ = \ \[Sum]\+\(j = 1\)\%N wout\_\(\(\[LeftDoubleBracket]\)\(j\)\(\
>\[RightDoubleBracket]\)\)\ \[Alpha]\_\(\(\[LeftDoubleBracket]\)\(j, N + 1\)\(\
>\!\(win\_\(\(\[LeftDoubleBracket]\)\(i\)\(\[RightDoubleBracket]\)\) = \
>\[Sum]\+\(j = 1\)\%N wout\_\(\(\[LeftDoubleBracket]\)\(j\)\(\
>\[RightDoubleBracket]\)\)\ \[Alpha]\_\(\(\[LeftDoubleBracket]\)\(j, i\)\(\
>\[RightDoubleBracket]\)\) +
> X[n]*\ \[Alpha]\_\(\(\[LeftDoubleBracket]\)\(N + 1, i\)\(\

Your notation is confusing and you didn't fully specify the neural network. It appears that
you have two definitions for wout and win. In one you use [[ ]] and another you use [ ]

I'm assuming from your discription that you have a fully connected neural network
with no hidden layers. The input is X = {x1, x2, ..., xm} and the output is Y = {y1, ..., yn}
where m and n are not necessarily equal to each other. If a is the weight matrix then

y1 = a11*x1 + a21*x2 + ... + am1*xm
yn = a1n*x1 + a2n*x2 + ... + amn*xm

or in matrix and Matheamtica notation
Y = Transpose[A].X

Also in your notation you specifed wout[[i]] = win[[i]] g, where I'm assuming g is the gain
of the neurons in the output layer. In this case
Y = g * Transpose[A].X

Note the . is matrix mulitplication in Mathematica

URL: ,

Subject (listing for 'Some help w/ a generalized H for NNs?')
Author Date Posted
Some help w/ a generalized H for NNs? Jeff Haynes 10/24/00 06:49am
Re: Some help w/ a generalized H for NNs? Aaron Honecker 10/26/00 06:18am
< Previous CommentHelp | Reply To Comment | Reply To Topic