NVIDIA / gpu-rest-engine

A REST API for Caffe using Docker and Go
BSD 3-Clause "New" or "Revised" License
421 stars 94 forks source link

Issues with using less than 5 classifications #5

Closed emerysilb closed 7 years ago

emerysilb commented 7 years ago

I am using DIGITS 4 models trained with Googlenet with GRE and it seems to work great when I provide a model that was trained using 5 or more classifications. Although many classifications is very useful, right now I am trying to use two classifications and when I plug the two class network into GRE, I always seem to get a memory corruption issue.

Error in `inference': malloc(): memory corruption: 0x00007f892c111420 ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x77725)[0x7f8962774725] /lib/x86_64-linux-gnu/libc.so.6(+0x819be)[0x7f896277e9be] /lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x54)[0x7f89627805a4] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_Znwm+0x18)[0x7f8962d72e78] inference(_ZNSt6vectorIiSaIiEE19_M_emplace_backauxIIRKiEEEvDpOT+0x3e)[0x5ede4e] inference(_ZN10Classifier8ClassifyB5cxx11ERKN2cv3MatEi+0x27b)[0x5e8d4b] inference(classifier_classify+0x24f)[0x5e924f] inference(_cgo_53771bef0329_C2func_classifier_classify+0x33)[0x5e7403]

Although this issue happens almost every time I plug in a network with two classifications, one time GRE was able to respond properly.

Help on this issue would be greatly appreciated. Thank you!

flx42 commented 7 years ago

Ah yes, I fixed it in the BVLC/caffe example, but not here. You just need this additional line I believe

emerysilb commented 7 years ago

Thank you for the prompt response, but where exactly do I put that additional line?

flx42 commented 7 years ago

Here