Closed Cod1ng closed 7 years ago
Can't you just use a merge layer with mode = mul? http://keras.io/layers/core/#merge
I mean the Caffe to Keras converter can't process the INNER_PRODUCT layer.If I use other layer to replace it,I don't know how to tranfer the weights in the caffe model to the keras model.
Can anyone please post instructions how to extend the tool to support currently unsupported layer types? @Cod1ng - did you try to add support for INNER_PRODUCT yourself?
I am trying to add support for CROP level. This is where I got:
_V1LAYERPARAMETER.fields_by_name['crop_param'].message_type = _CROPPARAMETER
DESCRIPTOR.message_types_by_name['CropParameter'] = _CROPPARAMETER
(copy paste from other layers, and changing layer name to crop)
but then noticed this comment at the beginning of the file:
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: caffe.proto
and stopped...
No idea how to regenerate this file, or what protocol buffer compiler is.
Any help would be highly appreciated! @MarcBS - can you help please?The file caffe_pb2.py is generated when you compile the "pycaffe" wrapper for Caffe. You can find it here:
/caffe_root_path/python/caffe/proto/caffe_pb2.py
If you need a newer version of it, you just have to compile the latest version of Caffe by yourself and copy it into the corresponding folder of Keras.
I am sorry for not being able to help you implementing these additional features right now, but you are welcome to submit any PR adding useful features to this library!
I want to convert the vgg-face caffe model(http://www.robots.ox.ac.uk/~vgg/software/vgg_face/) to keras ,but it reminds me it doesn't support the INNER_PRODUCT layer at this time,please support it ASAP.Thanks!