dmlc / MXNet.cpp

C++ interface for mxnet
Other
114 stars 115 forks source link

The lenet.cpp example run error #30

Closed yangyiping closed 8 years ago

yangyiping commented 8 years ago

I am trying to run lenet.cpp sample. An error occurred at the first line with "Convolution" function. However, when we tried mlp.cpp, it ran to end normally.

default

My development environment: OS: windows10 visual studio 2013 GPU: geforce GTX 780

by the way, I noticed that the same error occurred in https://github.com/dmlc/MXNet.cpp/issues/2. but I don't get the solution from it.

zhangchen-qinyinghua commented 8 years ago

Are you using the latest version of mxnet?

yangyiping commented 8 years ago

@zhangchen-qinyinghua Thanks for your reply. I think that I am using the latest version because I downloaded it directly from "https://github.com/dmlc/MXNet.cpp" and the latest commit time of sample show "3 days ago".

zhangchen-qinyinghua commented 8 years ago

Hi, @yangyiping I mean the latest version of mxnet(https://github.com/dmlc/mxnet), not MXNET.cpp.

yangyiping commented 8 years ago

@zhangchen-qinyinghua I would like to run LeNet in visual studio C++ of microsoft in windows OS. The latest version which i mentioned is "https://github.com/dmlc/MXNet.cpp", not "https://github.com/dmlc/mxnet". Do you mean that I should copy the folders and files obtained from "https://github.com/dmlc/MXNet.cpp" into the master folders obtained from "https://github.com/dmlc/mxnet" firstly, and then start to compile and run exe file again.

zhangchen-qinyinghua commented 8 years ago

What I mean is you should use the latest mxnet library. As mentioned here, https://github.com/dmlc/MXNet.cpp/blob/master/lib/windows/README.md And there are new release of mxnet windows library, https://github.com/dmlc/mxnet/releases

Make sure you are using the latest mxnet library if you are using the latext MXNET.cpp :)

yangyiping commented 8 years ago

Yes,I am using the latest mxnet library. I tried 20160531_win10_x64_gpu.7z and 20160531_win10_x64_cpu.7z. I copied the libmxnet.lib into "MXNet.cpp-master\lib\windows\", and libmxnet.dll into "MXNet.cpp-master\windows\vs\MxnetTestApp\". However the error still occurred.

zhangchen-qinyinghua commented 8 years ago

@hjk41 @lx75249 Can you help debug this issue?

yangyiping commented 8 years ago

OK. I will try.

hjk41 commented 8 years ago

I think this is related to the binary compatibility problem. Could you try to build libmxnet.dll by yourself? Here is the instruction to build libmxnet.dll on windows: http://mxnet.readthedocs.io/en/latest/how_to/build.html#building-on-windows

conopt commented 8 years ago

It's because that mxnet::cpp::Symbol has a constructor which accepts SymbolHandle (void *) as the only parameter, and in lenetcpp example, some Symbol are created like Symbol("conv1"), and visual studio matches the void* constructor with it.

conopt commented 8 years ago

@yangyiping I have fixed it. You can try the new version to see if it works.

yangyiping commented 8 years ago

@lx75249 Thanks for your fix. In the new version, the position of error is changed to "Pooling" function in the 37th line in lenet.cpp from "convolution" function. The debug trace information shows the cause is that "symbol_handle" can not be created in "MXSymbolCreateAtomicSymbol" function.

conopt commented 8 years ago

@yangyiping You need to use the latest libmxnet library (register the new dll globally or put the dll besides your binary), since they changed parameters of pooling.

hjk41 commented 8 years ago

Closing this for now.