欢迎访问 生活随笔!

生活随笔

当前位置: 首页 >

TensorFlow2使用AutoGraph时出现关于gast的一个warning

发布时间:2023/12/29 44 豆豆
生活随笔 收集整理的这篇文章主要介绍了 TensorFlow2使用AutoGraph时出现关于gast的一个warning 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

 

在用tf.keras的model训练数据使,貌似用到了TensorFlow的AutoGraph,出现了warning 

WARNING:tensorflow:Entity <function Function._initialize_uninitialized_variables.<locals>.initialize_variables at 0x00000132B75C4D38> could not be transformed and will be executed as-is. Please report this to the AutoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: module 'gast' has no attribute 'Num'

按照github上的说法,AutoGraph需要gast,而gast升级到了最新的0.3.2,所以解决方法也比较简单,把gast降到0.2.2:

pip install gast==0.2.2

 

总结

以上是生活随笔为你收集整理的TensorFlow2使用AutoGraph时出现关于gast的一个warning的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。