我正在尝试使用load_graph加载预训练的模型,但是当我输入输入图像时,我得到了:
tensorflow.python.framework.errors_impl.InvalidArgumentError: NodeDef mentions attr 'Truncate' not in Op<name=Cast; signature=x:SrcT -> y:DstT; attr=SrcT:type; attr=DstT:type>; NodeDef: prefix/Cast = Cast[DstT=DT_FLOAT, SrcT=DT_UINT8, Truncate=false, _device="/job:localhost/replica:0/task:0/cpu:0"](prefix/Squeeze). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).
[[Node: prefix/Cast = Cast[DstT=DT_FLOAT, SrcT=DT_UINT8, Truncate=false, _device="/job:localhost/replica:0/task:0/cpu:0"](prefix/Squeeze)]]
我目前的猜测是我使用了错误版本的tensorflow。那么如何识别用于保存pb文件的tensorflow版本呢?