Skip to content
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

Int32 vs. int32, etc #48

Closed
waTeim opened this issue Jul 14, 2015 · 5 comments
Closed

Int32 vs. int32, etc #48

waTeim opened this issue Jul 14, 2015 · 5 comments

Comments

@waTeim
Copy link

waTeim commented Jul 14, 2015

Hey I'm just beginning to use this so perhaps is a simple fix or not even an error. I suspect typenames changing from julia 0.3.x to Julia 0.4.x is to blame. I've injected a print statement just prior to the error, I think it illustrates the problem.

julia> include("generated/caffe.jl")
caffe

julia> f = open("bvlc_googlenet.caffemodel")
IOStream(<file bvlc_googlenet.caffemodel>)

julia> x = ProtoBuf.readproto(f,caffe.BlobProto())
(0,:write_varint,:read_varint,Int32) 
ERROR: cannot read wire type 2 as int32       <---- because int32 != Int32?
 in error at /usr/local/julia-ab4f68468a/lib/julia/sys.dylib
 in readproto at /Users/jeffw/.julia/v0.4/ProtoBuf/src/codec.jl:345
 in readproto at /Users/jeffw/.julia/v0.4/ProtoBuf/src/codec.jl:308
@tanmaykm
Copy link
Member

Doesn't seem like. Wire type 2 indicates a length delimited field (https://github.com/tanmaykm/ProtoBuf.jl/blob/3d335bb6820e1b0a46517dcff52b2525f15ba14f/src/codec.jl#L8)

This looks more like a data corruption or the data is not really the same as caffe.BlobProto.
It will probably help if you can narrow it down to a smaller independent piece of code.

@waTeim
Copy link
Author

waTeim commented Jul 14, 2015

I think you are right and it's not a BlobProto though I'm not sure what it is if not that. Maybe the prototext defines the messages? Here's a reference to the caffe organization. I'm 100% sure it's not a corrupted file.

@tanmaykm
Copy link
Member

It's probably a serialized form of the network as described here: http://arxiv.org/abs/1409.4842

Can you try reading it as caffe.NetParameter() instead?

@waTeim
Copy link
Author

waTeim commented Jul 14, 2015

Oh yes that worked, I think ... perfectly here's some output

@tanmaykm
Copy link
Member

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants