https://tensorflow.google.cn/versions/r2.0/api_docs/cc/class/tensorflow/tensor.html#classtensorflow_1_1_tensor
Tensor *tensor;
auto tensor_data = tensor->tensor<float, 3>();
tensor_data(j, i, 0) = pixel[0];
tensor_data(j, i, 1) = pixel[1];
tensor_data(j, i, 2) = pixel[2];
Tensor thresholds(tensorflow::DT_FLOAT, tensorflow::TensorShape({3}));
float *pthresholds = thresholds.flat<float>().data();
pthresholds[0] = 0.6;
pthresholds[1] = 0.7;
pthresholds[2] = 0.7;
Tensor factor(tensorflow::DT_FLOAT, tensorflow::TensorShape());
factor.scalar<float>()() = 0.709;