title: How do I set the value of an input tensor in c++?
body: <p>I'm trying to run a sample through a pre trained model on ios. session->Run() takes as input a tensor to my understanding. I have initialized a tensor, but how do i set it's value? I don't have much experience using C++. </p>
  
  <p>I have successfully created a test model that accepts 3 dimensional tensor of shape {1, 1, 10}. </p>
  
  <p>I pulled the following line of code from Tensorflow's simple example to create the input tensor.</p>
  
  <p><a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/ios_examples/simple/RunModelViewController.mm#L189" rel="noreferrer">https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/ios_examples/simple/RunModelViewController.mm#L189</a></p>
  
  <p><code>tensorflow::Tensor input_tensor(tensorflow::DT_FLOAT, tensorflow::TensorShape({1,1,10}));</code></p>
  
  <p>From here, I cannot figure out how I would set the data of input_tensor. I would like to set the tensor to something like {{{.0, .1, .2, .3, .4, .5, .6, .7, .8, .9}}}</p>