如何在 .pb 文件中找到输出节点的确切名称?

How to find the exact name of the output node in .pb file?

我试图冻结一个 pb 文件以便在 OpenVino 中使用。为了冻结,我需要知道输出节点名称。为此,我尝试加载 pb 文件并读取输出名称,但是出现错误。然后我尝试从模型摘要中获取输出名称,它是 dense_7(密集)。

我按照https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_TensorFlow.html#freeze-the-tensorflow-model中的命令冻结了模型。但是当我尝试将输出节点名称设为 dense_7(密集)时,出现以下错误:

AssertionError: dense_7 (Dense) is not in graph

我附上模型摘要。

有没有办法读取正确的输出名称?