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