[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: running a network outside of PDP++
OK, I have made some headway .... still unsure of a really easy method
to export a network's weights as binary data ... text data exports
weights and biases with rounding errors....
onto the sigmoid ....
after diving into the code, I now know that the default connection spec.
is given in the C++ class (file pdp/netstru.h):
class SigmoidSpec : public taBase {
};
It actually implements the sigmoid as the following :
1/(1+exp(-((x-off)*gain)))
which is written in the code :
float Eval(float x)
{ return Clip(1.0f / (1.0f + expf(-ClipNet((x - off) * gain)))); }
where off=0 and gain=1 by default.
On Thu, Sep 30, 2004 at 01:28:04PM +1000, Matt Flax wrote:
> Hi all,
>
> It has been a while, I am happy to say that PDP++ is still training for
> me.
>
> OK ... down to business !
>
> I have trained a network and have now saved the weights/biases of this
> trained network to file using this funtion :
> WriteWeights(File output_file)
> http://www.cnbc.cmu.edu/Resources/PDP++//manual/pdp-user_113.html#IDX564
>
> The network looks like so :
> http://mffm.ee.unsw.edu.au/~flatmax/network.gif
>
> So I have the weights in a file ... I would like to write an octave.org
> (like Matlab) or even a C++ algorithm to run the weights on data in a system.
>
> I see in the weights file the following :
> #Layer Layer_0
> #Unit
> 0.110906
> #Unit
> 0.130263
>
> As layer 0 is my input layer ... these unit values must be biases ?
>
> Then layer 1 and 2 have the following type of content :
> #Layer Layer_1
> #Unit
> -13.5269
> #Con_Group 0
> #Size 80
> -1.92932
> -1.39323
> -2.97075
> -3.88075
> 0.200701
>
> I assume that the first value is the bias and the other 80 are weights ?
>
> likewise for each perceptron in the layer ...
>
> Can anyone tell me ...
> Do I implement the network for the input layer as :
> output = f( input+bias )
>
> where f(.) is a sigmoid function. How do I find the function of this
> sigmoid ?
>
> And for a regular layer would it be (for one perceptron) :
> output = f( ( [input1:input80].[weight1:weight80] ) +bias )
>
>
> thanks in advance
> Matt
> --
> http://www.flatmax.org
>
> WSOLA TimeScale Audio Mod : http://mffmtimescale.sourceforge.net/
> FFTw C++ : http://mffmfftwrapper.sourceforge.net/
> Vector Bass : http://mffmvectorbass.sourceforge.net/
> Multimedia Time Code : http://mffmtimecode.sourceforge.net/
--
http://www.flatmax.org
WSOLA TimeScale Audio Mod : http://mffmtimescale.sourceforge.net/
FFTw C++ : http://mffmfftwrapper.sourceforge.net/
Vector Bass : http://mffmvectorbass.sourceforge.net/
Multimedia Time Code : http://mffmtimecode.sourceforge.net/