axeltidemann / self_dot

An artificial sentient being.
GNU General Public License v3.0
7 stars 3 forks source link

brain load not working? #1

Closed Oeyvind closed 10 years ago

Oeyvind commented 10 years ago

When doing 2 recordings, all working ok, I do:

python communication save mybrain then I quit, and restart, and send python communication load mybrain python learnrespond 5 respond

And get:

Process Process-5: Traceback (most recent call last): File "C:\Python27\lib\multiprocessing\process.py", line 232, in _bootstrap self.run() File "C:\Python27\lib\multiprocessing\process.py", line 88, in run self._target(_self._args, _self._kwargs) File "C:\Projects\self_dot\git\self_dot\AI.py", line 89, in respond audio_net, video_net, scaler = brain[np.argmin(state['rmse'])] File "C:\Python27\lib\site-packages\numpy\core\fromnumeric.py", line 948, in argmin return _wrapit(a, 'argmin', axis) File "C:\Python27\lib\site-packages\numpy\core\fromnumeric.py", line 43, in _wrapit result = getattr(asarray(obj), method)(_args, _kwds) ValueError: attempt to get argmin of an empty sequence

axeltidemann commented 10 years ago

This works for me - however, you must wait for the brain to load before trying to get a response. This can take a few seconds (even on my SSD). You will know it is loaded when it says

Brain loaded from file mybrain (820MB)

I guess what's confusing is that self prints out all the messages it receives - maybe some more printing should be added, i.e.

Starting to load brain... finished
Oeyvind commented 10 years ago

Ok. Confirmed working well here too.