dmlc / MXNet.cpp

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

mlp example reports segmentation fault error when exits #64

Closed flyers closed 7 years ago

flyers commented 7 years ago

The mlp example here https://github.com/dmlc/MXNet.cpp/blob/master/example/mlp.cpp will not exit normally but complains about a segmentation fault (core dumped) error, probably because some of the resources are not cleaned up. Does anyone know why? Thanks.

mz24cn commented 7 years ago

try calling MXNotifyShutdown() before main() exits.

flyers commented 7 years ago

@mz24cn Thanks for your reply. It works. Besides, I also found the other examples don't work well under the current master mxnet version. For example, the lenet and googlenet example just give segmentation fault error.

flyers commented 7 years ago

@mz24cn In the lenet example, it looks like that the segmentation error starts from the convolution layer construction https://github.com/dmlc/MXNet.cpp/blob/master/example/lenet.cpp#L34-L35

mz24cn commented 7 years ago

try copying dmlc/nnvm.git repository latest version into dmlc/mxnet/nnvm directory, then recompile mxnet, rerun the examples.

flyers commented 7 years ago

@mz24cn Thanks very much. This issue can be closed now.