'How to cast Eigen::TensorMap to tensorflow::input

I'm using Tensorflow C++ API.
Got detected boxes and should filter it.
Tried use tensorflow::ops::NonMaxSuppressionV4, but don't undestand how to convert Eigen::TensorMap to tensorflow::input.
I have filtered the boxes manually with my own code howether want to know how to do it with tensorflow.
My code:

  std::vector<Tensor> outputs;
  Status runStatus = m_session->Run({ {m_inputLayer, tensor} }, m_outputLayer, {}, &outputs);
  tensorflow::TTypes<float, 3>::Tensor boxes = outputs[0].flat_outer_dims<float, 3>();
  tensorflow::ops::NonMaxSuppressionV4 filter(scope, boxes, scores, boxes.size()/2, m_thresholdIOU, m_thresholdScore);

Has anyone experienced this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source