在用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
在使用tf.keras进行模型训练时遇到TensorFlow AutoGraph警告,该警告与gast库的版本有关。通过将gast从0.3.2降至0.2.2,可以解决这一问题。
649





