Python 是否有C+的tf.lite.Interpreter.get#u input#u details的等价物+;?
在TensorFlow lite的Python API中,有一些方法可以检索有关输入和输出张量的详细信息,称为Python 是否有C+的tf.lite.Interpreter.get#u input#u details的等价物+;?,python,c++,python-3.x,tensorflow,tensorflow-lite,Python,C++,Python 3.x,Tensorflow,Tensorflow Lite,在TensorFlow lite的Python API中,有一些方法可以检索有关输入和输出张量的详细信息,称为tf.lite.Interpreter.get\u input\u details和tf.lite.Interpreter.get\u output\u details。我是在这些DICT中的“量化”条目之后,它包含平均值和标准偏差的值 在其他平台上部署这些模型时,我使用C++ API来建立解释器。为了准备模型的输入,我还需要均值和标准差 我无法在C++中找到这些函数的等价物。它们存在吗
tf.lite.Interpreter.get\u input\u details
和tf.lite.Interpreter.get\u output\u details
。我是在这些DICT中的“量化”条目之后,它包含平均值和标准偏差的值
在其他平台上部署这些模型时,我使用C++ API来建立解释器。为了准备模型的输入,我还需要均值和标准差
<>我无法在C++中找到这些函数的等价物。它们存在吗?你可以从
TfLiteTensor
结构中得到量化参数,比如
// Get the input tensor indices.
const std::vector<int>& inputs = interpreter->inputs();
// Get the tensor object of the 1st input.
TfLiteTensor* tensor = interpreter->tensor(input[0]);
const TfLiteQuantizationParams& params = tensor->param
//获取输入张量索引。
const std::vector&inputs=解释器->输入();
//获取第一个输入的张量对象。
TfLiteTensor*张量=解释器->张量(输入[0]);
常量TfLiteQuantizationParams¶ms=张量->参数
您也可以使用printExpressorState()
获取相同的信息,事实上,这是非常令人难以接受的:
tflite::PrintInterpreterState(interpreter.get());
简短的答案是否定的,但是你可以重塑C++中的输入和输出张量。