我是靠谱客的博主 包容棒球,这篇文章主要介绍Tensorflow:AssertionError: Bad argument number for Name: 3, expecting 4 (bug)1. 问题描述2. 解决方案3. 参考地址,现在分享给大家,希望可以做个参考。

1. 问题描述

LZ配置的tf环境,只要运行就会出现一堆类似上述的错误

复制代码
1
2
AssertionError: Bad argument number for Name: 3, expecting 4 (bug)
复制代码
1
2
WARNING: Entity <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f4ab843b3c8>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f4ab843b3c8>>: AssertionError: Bad argument number for Name: 3, expecting 4

2. 解决方案

因为对结果的影响不可观,所以就没去在意 ,后面发现用其他docker并没有多少问题,而且每次都出现一堆warning很影响美观性,于是百度准备解决这个问题

后来发现是有个gast的库版本太高,导致不兼容的问题,降级gast即可解决
在这里插入图片描述

使用pip或者conda进行降级

复制代码
1
2
3
4
pip install --user gast==0.2.2 conda install gast==0.2.2

3. 参考地址

  1. https://github.com/tensorflow/autograph/issues/1

最后

以上就是包容棒球最近收集整理的关于Tensorflow:AssertionError: Bad argument number for Name: 3, expecting 4 (bug)1. 问题描述2. 解决方案3. 参考地址的全部内容,更多相关Tensorflow:AssertionError:内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(69)

评论列表共有 0 条评论

立即
投稿
返回
顶部