protocol-buffers

gRPC + Image Upload

Deadly 提交于 2019-12-28 05:33:11
问题 I want to create a simple gRPC endpoint which the user can upload his/her picture. The protocol buffer declaration is the following: message UploadImageRequest { AuthToken auth = 1; // An enum with either JPG or PNG FileType image_format = 2; // Image file as bytes bytes image = 3; } Is this approach of uploading pictures (and recieving pictures) still ok regardless of the warning in the gRPC documentation? And if not, is the better approach (standard) to upload pictures using the standard

Retrieve large blob from Android sqlite database

一个人想着一个人 提交于 2019-12-27 23:00:23
问题 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

Retrieve large blob from Android sqlite database

允我心安 提交于 2019-12-27 22:53:24
问题 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

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

泄露秘密 提交于 2019-12-27 18:27:13
问题 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

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

南笙酒味 提交于 2019-12-27 18:25:09
问题 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

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

对着背影说爱祢 提交于 2019-12-27 18:24:44
问题 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

Building bazel from source on IBM power8

别说谁变了你拦得住时间么 提交于 2019-12-25 05:12:23
问题 I have access to a large IBM Power8 machine (running Ubuntu), and would like to build Bazel on it. However, when I try to do it as their installation instructions suggest, I get: me@machine:~/bazel-0.1.5$ ./compile.sh INFO: You can skip this first step by providing a path to the bazel binary as second argument: INFO: ./compile.sh compile /path/to/bazel 🍃 Building Bazel from scratch. Compiling Java stubs for protocol buffers... third_party/protobuf/protoc-linux-x86_32.exe -Isrc/main/protobuf/

Protobuf 3.0.0-alpha-1 not compiling on windows

烈酒焚心 提交于 2019-12-25 04:27:24
问题 I'm trying to compile protobuf 3.0.0 alpha 1 on Windows using MinGW 4.9.2 & MSYS. According to the instructions I'm supposed to: ./configure make make check make install I added --prefix=/c/path/to/mingw to configure (How to build Google's protobuf in Windows using MinGW?) but it didnt help. It fails at make with the message: CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /home/Markus/protobuf-3.0.0-alpha- 1/missing aclocal-1.14 -I m4 /home/Markus/protobuf-3.0.0-alpha-1/missing: line 81:

Why my Protobuf class can parse a string serialized by an other Protobuf class

折月煮酒 提交于 2019-12-24 23:01:04
问题 I tried to know what package I got in my tcp socket, so I use protobuf. But when I SerializeToString my first protobuf class, the ParseFromString method of an other protobuf class returns true. The two classes are differents Here are my .proto syntax = "proto3"; package protobuf; message Message { string content = 1; } message Player { int32 id = 1; string name = 2; } Here is my c++ code auto messageProto = new protobuf::Message; messageProto->set_content("Hello"); std::string data;

Apache Beam Go SDK with Dataflow

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 19:07:26
问题 I've been working with the Go Beam SDK (v2.13.0) and can't get the wordcount example working on GCP Dataflow. It enters crash loop trying to start the org.apache.beam.runners.dataflow.worker.DataflowRunnerHarness . The example is executing correctly when run locally using the Direct runner. The example was completely unmodified from the original example given above. The stack trace is: org.apache.beam.vendor.grpc.v1p13p1.com.google.protobuf.InvalidProtocolBufferException: Protocol message had