Caffe: Provide light upgrade tools source

Created on 12 Apr 2018  ·  5Comments  ·  Source: BVLC/caffe

Hi, I'm currently converting some old caffe models into caffe2 models.

caffe2.python.caffe_translator fails because the models use the old caffe protocol.

I think a lot of people want to use upgrade_net_proto_binary.cpp and upgrade_net_proto_text.cpp without compiling the whole caffe2.

It is currently possible to compile only the tools, but they still require BLAS and other heavy stuff.

Would it be possible to provide a minimal code to compile the upgrading tools?

Most helpful comment

I think there is a little confusion here:

Would it be possible to provide a minimal code to compile the upgrading tools?

This seems to be asking how to compile the Caffe(1) upgrade tools alone that handle migration between versions of the proto definition across versions of Caffe(1).

@louisabraham notes that the tools can be compiled alone, but some of the tools (like caffe itself obviously) have heavier dependencies than the upgrade tools might minimally need.

I understand the use case, but it seems like a one-off sort of problem, so it might be simplest to hack out whatever caffe.hpp and common.hpp include that you don't care to install right now and then compile upgrade_{net_proto_binary,net_proto_text,solver_proto_text} on your own.

As I recall (but have not checked!) all the upgrade tools really require is protobuf, boost, and some IO helpers in io.hpp.

All 5 comments

This question would belong to the Caffe2 team, and is not of interest to Caffe(1).

Thanks for taking the time to answer.

Technically it's about going from caffe1 to caffe1...

I think there is a little confusion here:

Would it be possible to provide a minimal code to compile the upgrading tools?

This seems to be asking how to compile the Caffe(1) upgrade tools alone that handle migration between versions of the proto definition across versions of Caffe(1).

@louisabraham notes that the tools can be compiled alone, but some of the tools (like caffe itself obviously) have heavier dependencies than the upgrade tools might minimally need.

I understand the use case, but it seems like a one-off sort of problem, so it might be simplest to hack out whatever caffe.hpp and common.hpp include that you don't care to install right now and then compile upgrade_{net_proto_binary,net_proto_text,solver_proto_text} on your own.

As I recall (but have not checked!) all the upgrade tools really require is protobuf, boost, and some IO helpers in io.hpp.

I understood it was to upgrade from old Caffe proto to new Caffe proto within Caffe1, but the use case where you want to do this without compiling all of Caffe1 is only for those who want to use something else than Caffe afterwards. So a corner use case we'd definitely not be interested in changing the Makefiles for.

@shelhamer exactly.
@naibaf7 I understand your point.

I just thought that:

  • many users are probably going to have the same problem
  • installing caffe is very complicated (I swear I spent 1 hour trying to install it on my own machine without GPU support. I'm currently stuck with #error regenerate this file with a newer version of protoc. and I don't even want to try debugging. I lost too much time with this installation and will ask to the engineer of my team to correct the missing .so that prevents me to use the tools from our server's caffe installation)
  • the official caffe repository is the most logical place for such a tool
  • the caffe developers are best suited to do that than the caffe2 devs

But if you think it is a

a corner use case we'd definitely not be interested in changing the Makefiles for

then my first argument is wrong, and I'll just try to find another solution.

Was this page helpful?
0 / 5 - 0 ratings