其他分享
首页 > 其他分享> > tensorflow:Entity <bound method Dense AssertionError: Bad argument number for Name: 3, expecting 4

tensorflow:Entity <bound method Dense AssertionError: Bad argument number for Name: 3, expecting 4

作者:互联网

1.问题 现场:

使用 的TensorFlow1 来训练模型:

WARNING:tensorflow:Entity <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f320847ff90>> 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 0x7f320847ff90>>: AssertionError: Bad argument number for Name: 3, expecting 4

2. 解决方案

不知道对模型有什么影响,上网查查怎么解决这个warning。

后来发现是有个gast的库版本太高,导致不兼容的问题,降级gast即可解决

使用pip进行降级 :pip install --user gast==0.2.2

参考:

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

标签:AssertionError,Dense,Name,argument,number,pip,tensorflow,gast
来源: https://blog.csdn.net/pearl8899/article/details/121793478