« first day (467 days earlier)      last day (1934 days later) » 
01:00 - 05:0009:00 - 22:00

1:05 AM
60000 0.185 0.000 0.185 0.000 neural_net.py:67(run)
60000 calls only take 0.185 seconds, let's see see what pybrain needs for that...
60000 0.953 0.000 5.338 0.000 module.py:119(activate)
So, PyBrain in Python takes 0.953, FANN which is a C extension to Python takes 0.185. Nice speedup. :D
That's about 5 times as fast, so it won't have much impact on the frame rate anymore.
Another difference is the total run time.
FANN: 360046 function calls in 0.842 CPU seconds
PyBrain: 4260317 function calls (4080317 primitive calls) in 9.372 CPU seconds
So much function calls... :S
And the speed up there is like 11 times faster.
So, @IvoFlipse, if you planned on using PyBrain you might want to ditch it when you really need to compute a lot of neural network data.
 
2:07 AM
Seems there is actually a fault in Python 2.6.X which was fixed somewhere in Python 2.7.X, argh...
I hope all libraries work there, but no time for upgrading now.
(It involves bad cleanup in the garbage collector which results in bad cleanup after making some call where I pass an array to the C extension, by swapping around two lines they fix that :P)
Or at least I hope so. Alternatively, I could just ignore getting the numbers FROM the NN and only put values into the NN; hence, manually initializing the NN at the beginning.
If and only if the set procedure does work. :P
But given that's an array of numbers instead of an array of structs it should...
 
2:25 AM
Eh well, I can set them one by one. I have to evolve them once every so many activations anyway.
F:\Personal\Documents\Programming\Eclipse\Experimentation>test2.py
Layer / Neuron 0123456789012345
L   1 / N    4 aaAA............
L   1 / N    5 aAAa............
L   1 / N    6 AaaA............
L   1 / N    7 aaAa............
L   1 / N    8 ................
L   2 / N    9 ....AAaAA.......
L   2 / N   10 ....AAAaa.......
L   2 / N   11 ....aAaaA.......
L   2 / N   12 ....aAAAa.......
L   2 / N   13 ....AaAAA.......
L   2 / N   14 ....aAaaa.......
L   2 / N   15 ................
L   3 / N   16 .........aAaAAAA
Setting them all to 1.0 seems to work quite fine, results into [0.0, 0.0] as a result which is expected.
Seems the first one is always square, to remap the input.
The second one is it's own length X previous length +1, same for the last one.
Woops, I accindentally had two hidden layers. So even my benchmarking is quite off in the positive way. :D
Layer / Neuron 012345678901
L   1 / N    5 AAAaa.......
L   1 / N    6 aaaaA.......
L   1 / N    7 aAAaa.......
L   1 / N    8 aaaaA.......
L   1 / N    9 AAaaa.......
L   1 / N   10 AAaAa.......
L   1 / N   11 ............
L   2 / N   12 .....aaaaAaa
L   2 / N   13 .....AaaAaaA
L   2 / N   14 ............
[1770920.0, -1.2970939874649048]
[0.0, 0.0]
Layer / Neuron 012345678901
L   1 / N    5 AAAAA.......
L   1 / N    6 AAAAA.......
L   1 / N    7 AAAAA.......
L   1 / N    8 AAAAA.......
L   1 / N    9 AAAAA.......
Much better.
@IvoFlipse: Am I supposed to evolve the bias value just like the other values, or should it have a constant value?
Column 4 and 11 are the bias columns, in the original they seem to have random values as their strength (the a-Ab-B...z-Z value) aren't equal.
Erm, I'll just try to evolve them.
But writing the algorithm to write them away is for next time, glad I already got rid of this performance issue. ^^
And as I have to start working towards exams next time probably isn't soon...
Given that it's only one hidden layer now instead of the accidental two I guess I have optimized it by another 0.25% improvement.
@studiohack: Feel free to migrate the above to Fake Programmers, till this line. ^^
Time to go catch some sleep.
 
 
2 hours later…
4:12 AM
32 messages moved from Root Access
 
01:00 - 05:0009:00 - 22:00

« first day (467 days earlier)      last day (1934 days later) »