protocol-buffers

How to solve the issue with Dalvik compiler limitation on 64K methods?

余生长醉 提交于 2019-11-27 04:15:45
问题 My team and I have inherited a large Android project from another team. The whole application with all the included libraries is reported to have around 35000 methods. We now have the task to implement a new service in the app where we need to use Protocol Buffers. The problem is that the generated .jar file with all the required .proto files creates another couple of 35000 methods, that's 70000 methods. And if you are not aware, the Android compiler has a limitation of 65536 methods per .dex

What's the best way to represent System.Decimal in Protocol Buffers?

安稳与你 提交于 2019-11-27 02:40:55
问题 Following on from this question, what would be the best way to represent a System.Decimal object in a Protocol Buffer? 回答1: Well, protobuf-net will simply handle this for you; it runs off the properties of types, and has full support for decimal . Since there is no direct way of expressing decimal in proto, it won't (currently) generate a decimal property from a ".proto" file, but it would be a nice tweak to recognise some common type ("BCL.Decimal" or similar) and interpret it as decimal. As

No module named google.protobuf

时间秒杀一切 提交于 2019-11-27 02:34:50
问题 I am trying to run Google's deep dream. For some odd reason I keep getting ImportError: No module named google.protobuf after trying to import protobuf. I have installed protobuf using sudo install protobuf . I am running python 2.7 OSX Yosemite 10.10.3. I think it may be a deployment location issue but i cant find anything on the web about it. Currently deploying to /usr/local/lib/python2.7/site-packages. 回答1: There is another possibility, if you are running a python 2.7.11 or other similar

connect input and output tensors of two different graphs tensorflow

不问归期 提交于 2019-11-27 02:03:44
问题 I have 2 ProtoBuf Files, I currently load and forward pass each of them separately, by calling- out1=session.run(graph1out, feed_dict={graph1inp:inp1}) followed by final=session.run(graph2out, feed_dict={graph2inp:out1}) where graph1inp and graph1out are input node and output node of graph 1 and similar terminology for graph 2 Now, I want to connect graph1out with graph2inp such that I only have to run graph2out while feeding graph1inp with inp1 . In other words connecting the input and

Retrieve large blob from Android sqlite database

喜你入骨 提交于 2019-11-27 01:35:34
I stored chunks of binary data (protobufs) in the sqlite database of an Android app without realizing that Android's Cursor can only hold a maximum of 1MB of data. I now know that I should have stored these binary blobs in files and only referenced the files in the sqlite database entries. I need to upgrade the database (the app has been in use for a while) in order to move these binary chunks to files. The problem is that some user's data may have already exceeded the 1MB limit and I'm not able to retrieve it from the database (accessing the resulting Cursor for a single row that contains a

Is there an example on how to generate protobuf files holding trained TensorFlow graphs

一个人想着一个人 提交于 2019-11-26 23:41:34
I am looking at Google's example on how to deploy and use a pre-trained Tensorflow graph (model) on Android. This example uses a .pb file at: https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip which is a link to a file that downloads automatically . The example shows how to load the .pb file to a Tensorflow session and use it to perform classification, but it doesn't seem to mention how to generate such a .pb file, after a graph is trained (e.g., in Python). Are there any examples on how to do that? EDIT: The freeze_graph.py script, which is part of the TensorFlow

How to decode protobuf binary response

和自甴很熟 提交于 2019-11-26 23:18:39
问题 I have created a test app that can recognize some image using Goggle Goggles. It works for me, but I receive binaryt protobuf response. I have no proto-files, just binary response. How can I get data from it? (Have sent some image with bottle of bear and got the nex response): A TuborgLogo9 HoaniText���;�)b���2d8e991bff16229f6"� +TR=T=AQBd6Cl4Kd8:X=OqSEi:S=_rSozFBgfKt5d9b0 +TR=T=6rLQxKE2xdA:X=OqSEi:S=gd6Aqb28X0ltBU9V +TR=T=uGPf9zJDWe0:X=OqSEi:S=32zTfdIOdI6kuUTa +TR=T=RLkVoGVd92I:X=OqSEi:S

what's the right way to do polymorphism with protocol buffers?

谁说胖子不能爱 提交于 2019-11-26 22:38:06
问题 I'm trying to long-term serialize a bunch of objects related by a strong class hierarchy in java, and I'd like to use protocol buffers to do it due to their simplicity, performance, and ease of upgrade. However, they don't provide much support for polymorphism. Right now, the way I'm handling it is by having a "one message to rule them all" solution that has a required string uri field that allows me to instantiate the correct type via reflection, then a bunch of optional fields for all the

Google Protocol Buffers - JavaScript

喜你入骨 提交于 2019-11-26 22:14:40
问题 Is it a good choice to use Google Protocol Buffers in JavaScript or is it better to do it with JSON? Also if someone can give me a simple example about Protocol Buffers implementation in JavaScript. Becauseon Google's site I think it's very poor. 回答1: [edit] Google's open source implementation of protocol buffers is available on github The official protobuf project support only Java, C++, and Python. Not Javascript. According to the Wiki of the project, there are three projects porting

No Operation named [input] in the Graph" error while fine tuning/retraining inceptionV1 slim model

余生颓废 提交于 2019-11-26 21:53:52
问题 I am trying to finetune/retrain InceptionV1 model here, on my own data. I was able to Convert the Image data to TFR format data using this. Pass the converted data to finetune_inception_v1_on_flowers Complete the training and evaluation in according to the script file above, I am attaching the logs here. INFO:tensorflow:global step 1000: loss = 0.1833 (20.37 sec/step) INFO:tensorflow:Stopping Training. INFO:tensorflow:Finished training! Saving model to disk. INFO:tensorflow:Scale of 0