Code Monkey home page Code Monkey logo

Comments (4)

lemuriandezapada avatar lemuriandezapada commented on August 22, 2024

Can't you just use a merge layer with mode = mul?
http://keras.io/layers/core/#merge

from keras.

Cod1ng avatar Cod1ng commented on August 22, 2024

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.

from keras.

ruslanagit avatar ruslanagit commented on August 22, 2024

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:

  1. In file caffe_utils.py: added extra entry in layer_num_to_name
  2. Tried to modify caffe_pb2.py - added a few extra lines, such as:
    _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?

from keras.

MarcBS avatar MarcBS commented on August 22, 2024

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!

from keras.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.