caffe-tensorflow icon indicating copy to clipboard operation
caffe-tensorflow copied to clipboard

Error encountered: No handler found for node kind: Sigmoid (expected: map_sigmoid)

Open chiggum opened this issue 8 years ago • 3 comments

While converting GoogleNet_SOD_finetune.caffemodel I got this error: "Error encountered: No handler found for node kind: Sigmoid (expected: map_sigmoid)"

The last layer in my network prototxt is a Sigmoid layer.

chiggum avatar Feb 16 '17 12:02 chiggum

I'm also stuck with the same problem. By reading the code, I found that caffe-tensorflow only implemented Softmax Layer for FCN. Use softmax or you have to define def map_sigmoid() in kaffe/tensorflow/transformer.py and define def sigmoid() in kaffe/tensorflow/network.py

kendemu avatar May 12 '17 00:05 kendemu

@kendemu I encountered with the same problem with @chiggum. So can you tell me how to define def map_sigmoid() in kaffe/tensorflow/transformer.py and define def sigmoid() in kaffe/tensorflow/network.py? Thanks a lot!

xuyinbo avatar Nov 04 '17 09:11 xuyinbo

@xuyinbo @chiggum In Network class from kaffe/tensorflow/network.py, implement method sigmoid. The transformer.py have an ability to do reflection of the Network class methods, so you don't have to modify transformer.py. e.g. : softmax -> map_softmax

    @layer
    def sigmoid(self, input, name):
	return tf.nn.sigmoid(input, name=name)

You can see the implementation of softmax for the implementation sample.

kendemu avatar Nov 06 '17 02:11 kendemu