Habari! Hujambo?

6. Sep. 2003 17:45

Results from testing.

This is not the code that was tested, but my latest before we really started implementing the Hopfield.

http://www.stenmorten.f2s.com/KmZB/Striate030902_1922.zip

2. Sep. 2003 12:43

There is still an issue with the function Right() in utils.h, but we're getting there, and fast!

http://www.stenmorten.f2s.com/KmZB/Striate030902_1242.zip

30. Aug. 2003 08:59

Chris has incorporated Aidan's idea about the binocular field during testing into the striate. That is, no matter if the binocular input is discrepant or not, the network "sees" a random number between the two inputs it gets for each field. If both eyes agree and B gets 1, then a random number between 1 and 1 is still 1, and the same with 0. Thus, only when it sees discrepant pictures will random numbers be used. This is instead of blending them, which would always give 0.5.

http://www.stenmorten.f2s.com/KmZB/Striate030830_0854.zip

29. Aug. 2003 14:07

Major code break through. Details inside:
http://www.stenmorten.f2s.com/KmZB/Striate030829_1409.zip

in main(), you will find this code:

if (!g_Striate->Finished())   
{
// gets the winning pictures of this iteration
vector<double> &left = g_Striate->GetWinningNodeL()->GetWeights();
vector<double> &right = g_Striate->GetWinningNodeR()->GetWeights();
vector<double> &bin = g_Striate->GetWinningNodeB()->GetWeights();

/* We have the winning data from each iteration as
three pointers to vector< double >...

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!! NOW PASS THEM TO HOPFIELD DURING TRAINING HERE !!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

*/

It reads out the winning data for each network on each iteration, and it is now just itching to pass it on to a Hopfield network.

28. Aug. 2003 20:40

  • TODO:
  • During testing, fix input to binocular SOM.
  • During training, get the BMU from each SOM and feed it into the Hopfield net.
     

This version of the Code trains the 3 networks on all pictures in the folder /train. Pics need to be 50x40 (for example), so x - y = even number (e.g., 50-40 = 10). Then, 10+30 pixels worth will be sent to the Left SOM, (5 black + 30 pixels + 5 black) is sent to the Binocular SOM, and the middle 30 + rightmost 10 are sent to the right eye. It works, people!

http://www.stenmorten.f2s.com/KmZB/Striate030828_2039.zip

Daniel's pictues
http://www.stenmorten.f2s.com/KmZB/inputs.zip

27. Aug. 2003 10:53

Plan: At start-up, SOMDemo.exe reads the files in folder "bmps" and converts them into text-binaries ("void CBitmapToBinary(...)")

26. Aug. 2003 16:46
http://www.stenmorten.f2s.com/KmZB/Striate030826_1646.zip

This is now the most recent code. It will read all files in the directory "train" and use them to train the network. These must be of the type outputted by Chris's "void CBitmapToBinary(...)" method (the Win32 version, incorporated into this project, is in the utils.h-file). It does not yet recognise 50x40 pictures, so it does not separate out the relevant parts of the pictures for the 3 neural nets. That is my next goal.  

26. Aug. 2003 12:37

I forgot to say, the code below  produces a complaint from the compiler, that variable theta is declared but not used. This is correct. I have set up the Striate->Test() method to compare L/R/B results with every one of the pictures in a file called "Test5x5.dat". So if you let SOMDemo.exe run till it has finished training, a MessageBox will appear telling you the absolute difference  d = | |(L-B)| - |(R-B)| | for each of the three pictures in test5x5.dat. Makes sense? If d ca= 0, then there is no rivalry. If d > theta, e.g., d >> 0, then there is rivalry at the lower level (the striate).

We must find theta experimentally.

26. Aug. 2003 12:30
http://www.stenmorten.f2s.com/KmZB/Striate030826_1157.zip

MSVC++ compiles it into an .exe-file called SOMDemo.exe which requires a file called "Data5x5.dat" to be in the same directory as the .exe to run ... except if you're running the program from within Visual C++, then the .dat file needs to be in your working directory, i.e., not in the "Debug" or "Release" folder.

The name and size of the training file can be changed in "constants.h". This is the first place to start tweaking, if that is your game.

It should compile as Release-version, but if it doesn't, go to Build->Set Active Configuration->(...) Relase (...)
This will make the .exe MUCH faster.


 

Binocular Rivalry

IT cortex

Home

 

 

Binocular Rivalry

IT cortex

Home