https://tensorflow.google.cn/versions/r2.0/api_docs/cc/class/tensorflow/tensor.html#classtensorflow_1_1_tensor

    1. Tensor *tensor;
    2. auto tensor_data = tensor->tensor<float, 3>();
    3. tensor_data(j, i, 0) = pixel[0];
    4. tensor_data(j, i, 1) = pixel[1];
    5. tensor_data(j, i, 2) = pixel[2];
    1. Tensor thresholds(tensorflow::DT_FLOAT, tensorflow::TensorShape({3}));
    2. float *pthresholds = thresholds.flat<float>().data();
    3. pthresholds[0] = 0.6;
    4. pthresholds[1] = 0.7;
    5. pthresholds[2] = 0.7;
    1. Tensor factor(tensorflow::DT_FLOAT, tensorflow::TensorShape());
    2. factor.scalar<float>()() = 0.709;