关于TensorFlow2的tf.function()和AutoGraph的一些问题解决

Posted flyuz

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了关于TensorFlow2的tf.function()和AutoGraph的一些问题解决相关的知识,希望对你有一定的参考价值。

在使用TensorFlow的AutoGraph的时候出现了一些问题,特此记录

AutoGraph did not convert this function. Try decorating it directly with @tf.function()
WARNING:  export AUTOGRAPH_VERBOSITY=10

是因为AutoGraph需要gast,而gast升级到了最新的0.3.2,所以解决方法也比较简单,把gast降下去

pip install gast==0.2.2

以上是关于关于TensorFlow2的tf.function()和AutoGraph的一些问题解决的主要内容,如果未能解决你的问题,请参考以下文章