title: how to construct tf_tensor without using tensorflow and feed it to my docker server
body: <p>I am trying do build a cpp-client to feed my tf_serving_docker image.</p>
  
  <p>The key is to use as little dependencies on tf , tf-serving as possible.</p>
  
  <p>I trained a denoising autoencoder on 1D time traces, the actual shape is 
  [1000, 1, 1] corresponding to 1000 data points as float values.</p>
  
  <p>I used this guide to construct a python client:
  <a href="https://hackernoon.com/how-we-improved-tensorflow-serving-performance-by-over-70-f21b5dad2d98" rel="nofollow noreferrer">https://hackernoon.com/how-we-improved-tensorflow-serving-performance-by-over-70-f21b5dad2d98</a></p>
  
  <p>And trying to convert to cpp code like:
  <a href="https://stackoverflow.com/questions/55033952/grpc-only-tensorflow-serving-client-in-c">gRPC-only Tensorflow Serving client in C++</a></p>
  
  <p><a href="https://github.com/Vetal1977/tf_serving_cpp_client/blob/master/src/serving_client.cc" rel="nofollow noreferrer">https://github.com/Vetal1977/tf_serving_cpp_client/blob/master/src/serving_client.cc</a></p>
  
  <p>Here he uses images, but i am unsure how to adapt it to my data structure.</p>
  
  <pre><code>// create input protobuf for the image
  tensorflow::TensorProto proto;
  proto.set_dtype(tensorflow::DataType::DT_FLOAT);
  proto.add_float_val(data);
  
  
  proto.mutable_tensor_shape()-&gt;add_dim()-&gt;set_size(1000);
  proto.mutable_tensor_shape()-&gt;add_dim()-&gt;set_size(1);
  proto.mutable_tensor_shape()-&gt;add_dim()-&gt;set_size(1);
  // initialize prediction service inputs
  google::protobuf::Map&lt;std::string, tensorflow::TensorProto&gt;&amp; 
  inputs = *predictRequest.mutable_inputs();
  inputs["input_traces"] = proto;
  
  // issue gRPC call to the service
  Status status = stub_-&gt;Predict(&amp;context, predictRequest, 
  &amp;response);
  </code></pre>
  
  <p>Somehow i need to user std vectors but i cant find or understand the needed proto.ad_????? function</p>