使用tensorboard查看模型结构时报错NodeDef mentions attr 'explicit_paddings'

本文详细记录了从旧版本TensorFlow升级至1.14过程中遇到的警告及错误,特别是关于NodeDef提及的属性'explicit_paddings'不在Op中,以及在升级过程中遇到的'Cannot uninstall 'wrapt''问题,并提供了相应的解决方案。
部署运行你感兴趣的模型镜像

WARNING:tensorflow:From pb.py:7: __init__ (from tensorflow.python.platform.gfile) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.gfile.GFile.
Traceback (most recent call last):
  File "pb.py", line 8, in <module>
    tf.import_graph_def(graph_def, name='graph')
  File "/home/wangpan/anaconda2/lib/python2.7/site-packages/tensorflow/python/util/deprecation.py", line 507, in new_func
    return func(*args, **kwargs)
  File "/home/wangpan/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/importer.py", line 430, in import_graph_def
    raise ValueError(str(e))
ValueError: NodeDef mentions attr 'explicit_paddings' not in Op<name=Conv2D; signature=input:T, filter:T -> output:T; attr=T:type,allowed=[DT_HALF, DT_BFLOAT16, DT_FLOAT, DT_DOUBLE]; attr=strides:list(int); attr=use_cudnn_on_gpu:bool,default=true; attr=padding:string,allowed=["SAME", "VALID"]; attr=data_format:string,default="NHWC",allowed=["NHWC", "NCHW"]; attr=dilations:list(int),default=[1, 1, 1, 1]>; NodeDef: {{node graph/MobilenetV2/Conv/Conv2D_Fold}}. (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).
 

升级到tensorflow1.14就好了。

升级tensorflow1.14过程ERROR: Cannot uninstall 'wrapt'问题,参考下面链接:

https://blog.youkuaiyun.com/dragonfly91/article/details/96425763

您可能感兴趣的与本文相关的镜像

TensorFlow-v2.15

TensorFlow-v2.15

TensorFlow

TensorFlow 是由Google Brain 团队开发的开源机器学习框架,广泛应用于深度学习研究和生产环境。 它提供了一个灵活的平台,用于构建和训练各种机器学习模型

Restoring model weights from the end of the best epoch: 48. 📈 开始评估... 2025-11-01 21:18:49.014503: E tensorflow/core/framework/node_def_util.cc:676] NodeDef mentions attribute use_unbounded_threadpool which is not in the op definition: Op<name=MapDataset; signature=input_dataset:variant, other_arguments: -> handle:variant; attr=f:func; attr=Targuments:list(type),min=0; attr=output_types:list(type),min=1; attr=output_shapes:list(shape),min=1; attr=use_inter_op_parallelism:bool,default=true; attr=preserve_cardinality:bool,default=false; attr=force_synchronous:bool,default=false; attr=metadata:string,default=""> This may be expected if your graph generating binary is newer than this binary. Unknown attributes will be ignored. NodeDef: {{node ParallelMapDatasetV2/_15}} 2025-11-01 21:18:54.057158: E tensorflow/core/framework/node_def_util.cc:676] NodeDef mentions attribute use_unbounded_threadpool which is not in the op definition: Op<name=MapDataset; signature=input_dataset:variant, other_arguments: -> handle:variant; attr=f:func; attr=Targuments:list(type),min=0; attr=output_types:list(type),min=1; attr=output_shapes:list(shape),min=1; attr=use_inter_op_parallelism:bool,default=true; attr=preserve_cardinality:bool,default=false; attr=force_synchronous:bool,default=false; attr=metadata:string,default=""> This may be expected if your graph generating binary is newer than this binary. Unknown attributes will be ignored. NodeDef: {{node ParallelMapDatasetV2/_15}} ✅ 有效样本数量: 1464/1500 🎯 准确率: 0.5786 📋 分类告: precision recall f1-score support positive 0.53 0.93 0.67 500 neutral 0.55 0.30 0.39 496 negative 0.74 0.50 0.59 468 accuracy 0.58 1464 macro avg 0.61 0.58 0.55 1464 weighted avg 0.61 0.58 0.55 1464 Traceback (most recent call last): File "D:\PyCharm\panxi\西北铜镍\text\多模态特征融合3.0.py", line 418, in <module> main() File "D:\PyCharm\panxi\西北铜镍\text\多模态特征融合3.0.py", line 409, in main acc, y_pred, probs = model.evaluate(image_paths, chemical_data, labels) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\PyCharm\panxi\西北铜镍\text\多模态特征融合3.0.py", line 391, in evaluate plt.show() File "D:\Python\Lib\site-packages\matplotlib\pyplot.py", line 613, in show return _get_backend_mod().show(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\PyCharm\PyCharm 2024.1\plugins\python\helpers\pycharm_matplotlib_backend\backend_interagg.py", line 41, in __call__ manager.show(**kwargs) File "D:\PyCharm\PyCharm 2024.1\plugins\python\helpers\pycharm_matplotlib_backend\backend_interagg.py", line 144, in show self.canvas.show() File "D:\PyCharm\PyCharm 2024.1\plugins\python\helpers\pycharm_matplotlib_backend\backend_interagg.py", line 85, in show buffer = self.tostring_rgb() ^^^^^^^^^^^^^^^^^ AttributeError: 'FigureCanvasInterAgg' object has no attribute 'tostring_rgb'. Did you mean: 'tostring_argb'? 又出现了这个错误, 而且我在运行的过程中看见了这个: 2025-11-01 21:18:24.757910: I tensorflow/core/framework/local_rendezvous.cc:405] Local rendezvous is aborting with status: OUT_OF_RANGE: End of sequence [[{{node IteratorGetNext}}]] 不知道是不是它影响的
最新发布
11-02
评论 3
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值