How to convert std :: vector <float> to tensor without copying to tensorflow in C ++?

In C ++, a multidimensional matrix is ​​stored in std::vector<float> . I need to use it in a tensor flow that uses tensors. Converting from a std::vector to a tensor seems not obvious. There is c_api that converts a vector to TF_Tensor instead of Tensor . std::copy also works, but I want to do the conversion without copying.

+6
source share

All Articles