happynear / caffe-windows

Configure Caffe in one hour for Windows users.
Other
1.32k stars 650 forks source link

TypeError: No to_python (by-value) converter found for C++ type: class caffe::LayerParameter #266

Open pedroartigas opened 6 years ago

pedroartigas commented 6 years ago

Hello All,

I am trying to get python layers working on the windows version of Caffe on visual studio. I am using a CPU only solution with everything out of the box. My python layer is a dummy one for now:

import caffe

class custom_class(caffe.Layer): def setup(self, bottom, top): pass

def forward(self, bottom, top):
    pass

def reshape(self, bottom, top):
    pass

def backward(self, top, propagate_down, bottom):
    pass

I am using miniconda2 (2.7.14 python) as recommended by this caffe-windows repository.

I surfed the internet regarding the above issue and it seems like the issue is related to the layer registry not being shared across caffe (I saw someone recommending using dynamic boost to make sure the registry is shared, but their solution uses only cmake and I would like to use visual studio).

Maybe the above statement is due to my lack of understanding of caffe, as I am new to the code base.

Has anyone encountered this issue? Any hints on how to solve it would be appreciated.

xuezhongcailian commented 6 years ago

@pedroartigas I have same error,how do you solve it ?Thank you very much.

pedroartigas commented 6 years ago

@xuezhongcailian I could not solve it.