opencog / destin

Deep SpatioTemporal Inference Network (DeSTIN) for vision processing
http://wiki.opencog.org/w/DeSTIN
GNU Lesser General Public License v3.0
34 stars 28 forks source link

som.py function problem #20

Closed StrangeTcy closed 7 years ago

StrangeTcy commented 8 years ago

For me, running idle som.py on Ubuntu 16.04 x64 prodcues a window, as expected. Pressing <F5> in this window produces another window, which outputs an error message:

=== RESTART: /home/enoch/the_machine/destin/Destin/Bindings/Python/som.py ===

Traceback (most recent call last): File "/home/enoch/the_machine/destin/Destin/Bindings/Python/som.py", line 41, in dn = pd.DestinNetworkAlt(pd.W32, layers, centroids, is_uniform) File "/home/enoch/the_machine/destin/Destin/Bindings/Python/pydestin.py", line 1668, in init this = _pydestin.new_DestinNetworkAlt(width, layers, centroid_counts, isUniform, layer_widths, imageMode) NotImplementedError: Wrong number or type of arguments for overloaded function 'new_DestinNetworkAlt'. Possible C/C++ prototypes are: DestinNetworkAlt::DestinNetworkAlt(SupportedImageWidths,unsigned int,unsigned int [],bool,unsigned int [],DstImageMode) DestinNetworkAlt::DestinNetworkAlt(SupportedImageWidths,unsigned int,unsigned int [],bool,unsigned int []) DestinNetworkAlt::DestinNetworkAlt(SupportedImageWidths,unsigned int,unsigned int [],bool)

linas commented 8 years ago

I don't think this code is actively maintained or used anywhere. You may want to contact Ted Sanders @tpsjr7 directly to see what the deal is.

StrangeTcy commented 8 years ago

Perhaps, and yet

tpsjr7 commented 8 years ago

Hello,

I've moved on from this project due to my personal situation and lack of free time. I would consider this particular implementation abandoned.

You may want to post a follow up to this thread

https://groups.google.com/d/msg/opencog/l0Bp5zkimJo/HiEfs9j_AgAJ

On Mon, Aug 29, 2016 at 2:08 AM, StrangeTcy notifications@github.com wrote:

Perhaps, and yet

  • This problem could still be solvable
  • OpenCog intends to integrate DeSTIN as far as I know, so shouldn't OpenCog people try to give this whole repository some attention?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/opencog/destin/issues/20#issuecomment-243048156, or mute the thread https://github.com/notifications/unsubscribe-auth/ACcjNUu6U-2n8MhoHiuJ3ziSqESa7ngOks5qkoVsgaJpZM4JvHoy .

StrangeTcy commented 8 years ago

Oh well. But at least that's some clarity. Thanks for the heads-up, Ted :-)

Also, does that make the issue closed?

linas commented 8 years ago

Well, if you think that you have some spare time, and were interested in taking over and working on this project, then you should contact Ben Goertzel to discuss. Otherwise, this is an issue that ... will get rotten and moldy with time.

StrangeTcy commented 8 years ago

I should probably finish reading EGi first.

jswiergo commented 8 years ago

Hi. I played with DeSTIN long time ago. Now I've checked it using fresh Ubuntu 16.04 with SWIG 2.0.12 installed from sources and it still works for me! idle som.py after some training iterations displays a window with map visualization. Are you sure you followed the build instruction precisely?

Regarding plans, I suppose OpenCog is going to integrate TensorFlow or Theano rather than DeSTIN, but I don't know if someone is working on that.

linas commented 8 years ago

Hi Jacek,

Ben did mumble something about using DeSTIN ideas to provide an overall control-framework for tensorflow or theano, or something like that, but I don't understand any details. I think he was less than happy about how well DeSTIN worked, but still felt that the raw theory of it was good and salvageable.

StrangeTcy commented 8 years ago

I am, but double-checking wouldn't hurt. I might report the results once I try to solve this issue myself.

As for Tensorflow or Theano, my general impression was that a machine using OpenCog should eventually become capable of "gobbling up" and integrating any neural network written in any language. And regarding working on it -- I might, but much later on, probably.

jswiergo commented 8 years ago

Hi @StrangeTcy. I have created Dockerfile (https://github.com/opencog/destin/blob/master/Dockerfile), maybe this will help you to install dependencies.

StrangeTcy commented 8 years ago

Thanks! I've built it, but in there trying idles som.py leads to

Traceback (most recent call last):

File "/usr/bin/idle", line 5, in main() File "/usr/lib/python2.7/idlelib/PyShell.py", line 1553, in main root = Tk(className="Idle") File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1818, in init self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) _tkinter.TclError: no display name and no $DISPLAY environment variable

StrangeTcy commented 8 years ago

I tried export DISPLAY=0.0, but then idle som.py said it

_tkinter.TclError: couldn't connect to display "localhost:0.0"

Trying docker run -it --env="DISPLAY" opencog/destin didn't help either.

jswiergo commented 7 years ago

This line works for me on Ubuntu: docker run -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=:0 -it opencog/destin

StrangeTcy commented 7 years ago

That helped. thanks a lot. Another issue: for all the cool things that are installed when this Dockerfile is used, I still have to install idle manually.

StrangeTcy commented 7 years ago

Yet another issue: I cannot use vi properly, and i wished to use an editor with a gui to edit som.py and point it to the right location of the cifar-10-batches-bin directory. But gedit errored on me:

No protocol specified Failed to connect to Mir: Failed to connect to server socket: No such file or directory Unable to init server: Could not connect: Connection refused

(gedit:5563): Gtk-WARNING **: cannot open display: :0

I had to do some cp -R to copy the cifar files to the location that was in the som.py originally. And then it worked like a charm.

StrangeTcy commented 7 years ago

idle dostuff.py worked as well, if slowly. Is it supposed to output a lot of calculations to console when running?

jswiergo commented 7 years ago

I have updated Dockerfile in #23, so it downloads CIPHAR data into proper directory as well as imports idle packages. It is not so easy to use gedit from inside docker container. But you can use idle instead. This is a development environment for python, seems to suffice at least for small changes.

dostuff.py works for me for about 30 seconds in total. It displays belief states for each layers nodes. After some training time the belief of 7th layer's single node corresponds with the state of the hand (open, closed, changing). This shows that the network learns. The console is supposed to display current belief states, so it outputs a lot.

StrangeTcy commented 7 years ago

Thanks!

Oh. I didn't realise that about idle.