Tensorflow:AssertionError: Bad argument number for Name: 3, expecting 4 (bug)

1. 问题描述

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

AssertionError: Bad argument number for Name: 3, expecting 4 (bug)
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进行降级

pip install --user gast==0.2.2

conda install gast==0.2.2

3. 参考地址

  1. https://github.com/tensorflow/autograph/issues/1
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值