-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Converting to and from cuda-convnet #212
Conversation
Can read the pickled cuda-convnet format and convert to prototxt format. Currently missing the top/bottom links and blob data.
Thanks @jamt9000 ! If it helps, the old decaf repo has some codes that tries to read and convert cuda-convnet formats. Of course decaf uses yet another network definition, but it may be helpful: https://github.com/UCB-ICSI-Vision-Group/decaf-release/tree/master/decaf/util/translator |
ie, the pickled dict of the model rather than just the pickled list of layers
To create a proper prototxt file model file that can be used with the python API. Add the data name and dimensions to the NetParameter fields.
Yeah, I'll switch to the new schema when that's all settled. Also, I spent a day debugging before realising...the decaf net is upside down :| But now the conversion seems to work. Also, another nice surprise is that caffe imagenet wrapper net is BGR instead of RGB :) |
Here's an example to show it working Convert the net:
Compare predictions on lena with DeCAF:
|
Thanks @jamt9000 for working this out, and I apologize for the decaf upside-down thing - yeah, it is a legacy issue and we were too lazy to address it... |
I'll wait for the refactoring before working on writing to cuda-convnet format. But I'm wondering what to do about dropout, since it is left as an "exercise for the reader" in the official cuda-convnet and there are various different implementations around (eg dnouri's). Would BVLC be able to share the patch they use to allow for better comparison? |
@jamt9000 the proto refactoring should be merged soon–thanks for your patience. As for a dropout patch for cuda-convnet, there is no such patch from Caffe since it was developed as a separate project. @jeffdonahue is your JeffNet fork of cuda-convnet public? Re: BGR, we have OpenCV's default to thank for that. Who would ever choose that? |
4278286
to
c01f07a
Compare
This is the oldest PR in the queue. It is 7 months old. Why some PR like this seems abandoned?
|
Please understand that we are a small research team doing this, and will If anyone would like to finish writing a translator I am happy to include Yangqing On Wed, Nov 26, 2014 at 4:34 PM, bhack notifications@github.com wrote:
|
@Yangqing I know. My question was on this older because I want to understand if the process of handing the PR queue could be improved and to incentive "third party" contributors in the period that they have effectively time to invest on. |
Probably we could cluster PR using a common tag semantics so its always clear what is the "stage/status" of an open PR. |
@Yangqing, may be caffe-core-dev group consider the possibility of adding one active community-member as moderator with rights to merge? It happens in almost all communities after library or whatever becomes popular. |
I don't know what is the best solution every community has found its own. The actual approach surely doesn't scale. |
I am very busy at the moment (just started a PhD) but should have time closer to Christmas and will surely be contributing to Caffe more in the future. |
@jamt9000 never mind the life change. This is the motivation cause I suggest to maintain the time slot a little bit short on PR for not vast contributions and stay with unfinished code. |
Closing as stale -- however model converters are welcome. |
Can you send ‘imagenet.decafnet.epoch90’ and ‘imagenet.decafnet.meta’ to me? |
1 similar comment
Can you send ‘imagenet.decafnet.epoch90’ and ‘imagenet.decafnet.meta’ to me? |
@jamt9000 do you have these two files of " imagenet.decafnet.epoch90" and "imagenet.decaf.meta"? they could not be downloaded from Yangqing Jia's homepage: http://daggerfs.com/index.html#publications. |
Unfinished, but creating PR to start discussion.
I plan on creating a tool to convert between cuda-convnet (pickled) files and caffe protobuffers.
At the moment it can (try to) convert the cuda-convnet "schema" to prototxt format (ie., ignoring the blobs). Next I will copy the blobs too and work on going the other way. It also doesn't do anything sensible about the input and loss layers yet.
If you have the supplied decaf net (trained with cuda-convnet) you can try: