程序中出现的错误:
tf.import_graph_def(graph_def, name='')
ValueError: NodeDef mentions attr 'Truncate' not in Op<name=Cast; signature=x:SrcT -> y:DstT; attr=SrcT:ty
pe; attr=DstT:type>; NodeDef: graph/Cast = Cast[DstT=DT_FLOAT, SrcT=DT_UINT8, Truncate=false](graph/DecodeJpeg). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).
解决方案:
参考了 沙河边の搬砖工的 原文:https://blog.csdn.net/qq_34113993/article/details/83656018
问题得到解决,在anaconda Prompt里重新安装tensorflow,使得其版本更新即可解决。