dmlc/MXNet.cpp

The lenet.cpp example run error

Closed this issue · 14 comments

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 #2.
but I don't get the solution from it.

Are you using the latest version of mxnet?

@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".

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

@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.

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 :)

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.

@hjk41 @lx75249
Can you help debug this issue?

OK. I will try.

hjk41 commented

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

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.

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

@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.

@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

Closing this for now.