Coder Social home page Coder Social logo

Use libcaffe externally about caffe HOT 9 OPEN

microsoft avatar microsoft commented on July 19, 2024
Use libcaffe externally

from caffe.

Comments (9)

dtmoodie avatar dtmoodie commented on July 19, 2024 2

I'm working on a version of caffe with proper dll exports.
https://github.com/dtmoodie/caffe
I can't get the test suite to run because of cuda linking issues, but so far it works correctly in my external applications.

from caffe.

sasagalic-MSFT avatar sasagalic-MSFT commented on July 19, 2024

Already reported in #45. Currently there is no way to workaround linking issue without modifying code but the one you described.
One option would be to add Caffe dll project to be used by external clients but that would require defining proper interface. Do you think this would be viable solution?

from caffe.

d4nst avatar d4nst commented on July 19, 2024

I thought about this too. It could be a solution, but it doesn't seem very clean either.

from caffe.

sasagalic-MSFT avatar sasagalic-MSFT commented on July 19, 2024

@danst18, why do you say that it would not be a clean solution? With dll proper interface can be defined (I would say just forward logic should be exposed since external clients have no interest in training part). Also, external clients would be freed from linking Caffe dependencies and would not be affected by changes in Caffe implementation.
Let me know your thinking.

from caffe.

d4nst avatar d4nst commented on July 19, 2024

Ok. I was thinking that it would be necessary to change the interface when Caffe changes, but this wouldn't be necessary actually, so I think it is a good solution πŸ‘ Sorry for the confusion.

from caffe.

pavlejosipovic avatar pavlejosipovic commented on July 19, 2024

@danst18 if the original issue is resolved, please close it.

from caffe.

d4nst avatar d4nst commented on July 19, 2024

@sasagalic-MSFT proposed a solution for this but as far as I know this has not been implemented yet, so the issue still persists

from caffe.

dashesy avatar dashesy commented on July 19, 2024

@dtmoodie other than DLL export is there anything else needed to export the symbols?

from caffe.

dtmoodie avatar dtmoodie commented on July 19, 2024

If I remember correctly, https://github.com/dtmoodie/caffe/blob/master/include/caffe/proto/caffe_pb.h is important to correctly export protobuf classes. Basically you can tell protobuf to add export decorations, but you need to actually define the export decorations somewhere. Thus I created caffe_pb.h which includes caffe.pb.h and changed everything to include caffe_pb.h instead of caffe.pb.h.

from caffe.

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.