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

Tensorflow's protobuf : compile .proto files and inlcude the generated class files in jar? #240

Open
thammegowda opened this issue Jun 21, 2016 · 3 comments

Comments

@thammegowda
Copy link

Is there a smart way to include the protocol buffer java counterparts into build?

I am having hard time deserializing protobuffers with c++ classes via JavaCPP.

Java classes of framework can be obtained by protoc

protoc  --java_out=protogen ./tensorflow/core/framework/*.proto

problem with this approach is ofcourse these classes are disconnected from core/framework.
Is there a smart way to swap/proxy the C++ equivalents with the classes generated by protoc ?

@saudet
Copy link
Member

saudet commented Jun 22, 2016

Not that I know of. There isn't anything else that comes close to JavaCPP when it comes to bridging the gap between Java and C++, so it's unlikely anyone has bothered to do anything about protobuf either...

@thammegowda
Copy link
Author

Thanks for the reply.
Javacpp is great and i also did not find anything else that comes closer to this.

Did any of you tried deserializing protobuf models with this library?
If yes, can you please point me to an example.

I tried, but then I found that we need c++ protobuf library in place to deserialize the model files to c++ classes. Else we need models classes in pure Java to use Java protobuf library.

Help Needed.

@saudet
Copy link
Member

saudet commented Jun 26, 2016

Either we're going to need both the C++ and Java versions of protobuf, that is to serialize from C++, and then deserialize from Java. That's just how it works.

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

No branches or pull requests

2 participants