protocol-buffers

No module named google.protobuf

不羁岁月 提交于 2019-11-28 09:01:49
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. Panfeng Li There is another possibility, if you are running a python 2.7.11 or other similar versions, sudo pip install protobuf is ok. But if you are in a anaconda environment, you should

set parameters in EventInput in Dialogflow V2 API

爷,独闯天下 提交于 2019-11-28 08:38:24
问题 I desperatly try to set parameters in a dialogflow.types.EventInput in python. This doc says the parameters need to be of type Struct . I read here that the parameters needs to be a google.protobuf.Struct. But it does not work for me. Is there another Struct type equivalent in python? If i send the EventInput without parameters, the intent is detected correctly. I tried this so far: import dialogflow_v2 as dialogflow session_client = dialogflow.SessionsClient() session = session_client

How to change the buffer limit in Google's protobuf?

﹥>﹥吖頭↗ 提交于 2019-11-28 08:36:44
I'm getting this warning and an error afterwards when I try to parse a large message. I know than 64MB which is the default limit. I am using message.ParseFromIstream now. Does any one know to get access to CodedInputStream object to call the SetTotalBytesLimit function? or any other way to solve this problem? Reading dangerously large protocol message. If the message turns out to be larger than 67108864 bytes, parsing will be halted for security reasons. To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.

protobuf-net inheritance

混江龙づ霸主 提交于 2019-11-28 06:59:56
Marc mentioned on stackoverflow that it will be possible in v2 of protobuf-net to use ProtoInclude attribute (or similar approach) to serialize/deserialize class hierarchy without a need to specify each subtype in the base class. Is this implemented yet? We have a plugin interface that can be derived in external libraries, so there is no way of knowing what the derived types will be. We could maintain unique numbering between types though, but I couldn’t find any examples on the net, short of using ProtoInclude attribute which requires a subtype to be specified. How would I go about

How do I get Eclipse to resolve classes generated with Maven 2?

你离开我真会死。 提交于 2019-11-28 03:54:37
I'm using Google Protocol Buffers to generate some Java classes for my project. Using Maven 2 and its "antrun" plugin, these classes are freshly generated before compile, output to target/generated-sources and put on the classpath during the build. So building the project from the POM is no problem. However, Eclipse doesn't know how to resolve the generated class, because the folder it's in doesn't seem to be on the IDE's classpath during development. I'm using m2eclipse and have it manage dependencies for me, so I had expected Maven to take care of this. How can I get IDE support (code

Google protocol buffers on iOS

我与影子孤独终老i 提交于 2019-11-28 03:43:16
Is the metasyntactic static library for iOS . . . http://code.google.com/p/metasyntactic/wiki/ProtocolBuffers . . . compatible with regular old C++ compiled protofiles? I do not want to use the bundled compiler that generates Obj-C. Is there any way to compile the library supplied by Google for iOS? Ok. It appears that the metasyntactic library (or any other 3rd party library) is unnecessary in this case. You can just add the Google source directly to your project. I found the following answer from Nicola Ferruzzi in a google discussion group . . . The original answer is here . . . http:/

TensorFlow Manual Construction of GraphDef

╄→尐↘猪︶ㄣ 提交于 2019-11-28 01:50:04
问题 In TensorFlow, I found that I can do the following, from tensorflow.core import framework from google.protobuf import json_format graph_def = framework.graph_pb2.GraphDef() node_def = framework.node_def_pb2.NodeDef() graph_def.node.extend([node_def]) print json_format.MessageToJson(graph_def) Which prints { "node": [ {} ] } Now, my node is not actually set to an Operation. I can't figure out how to make node_def be an operation. I can construct OpDefs via, from tensorflow.python.ops import

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

谁说胖子不能爱 提交于 2019-11-28 01:17:20
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 disables regularizer. WARNING:tensorflow:From eval_image_classifier.py:157: streaming_recall_at_k (from

AttributeError: Assignment not allowed to composite field “task” in protocol message object

北战南征 提交于 2019-11-27 22:58:29
问题 I'm using protocol-buffers python lib to send data,but it's have some problems, so Traceback (most recent call last): File "test_message.py", line 17, in <module> ptask.task = task File "build\bdist.win32\egg\google\protobuf\internal\python_message.py", line 513, in setter AttributeError: Assignment not allowed to composite field "_task" in protocol message object. the src as follows: proto file: message task { required int32 id = 1; required string msg = 2; } message task_info { required

protobuf-net v2 type meta

落花浮王杯 提交于 2019-11-27 22:51:57
问题 According to this post (from March), protobuf v2 allows us to resolve types from a stream. Since v2 is now in beta 5, I think this feature has already been implemented, so I was wondering how to use this new feature. I haven't been able to find any documentation on it, so some help would be greatly appreciated ! Type meta The serialization is fine, but I don’t know (and cannot know) all of my types up front. How can I do this? Well, protobuf is a contract based format; if you don’t know the