【发布时间】:2021-03-12 00:28:49
【问题描述】:
我收到一条警告,但我找不到解决方案。 显然是这样的:
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' # or any {'0', '1', '2'}
import tensorflow as tf
os.environ['AUTOGRAPH_VERBOSITY'] = '1'
不足以阻止这个烦人的消息:
WARNING:tensorflow:AutoGraph could not transform <function Model.make_train_function.<locals>.train_function at 0x00000281A55264C8> and will run it as-is.
Please report this to the TensorFlow team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output.
Cause: Bad argument number for Name: 4, expecting 3
To silence this warning, decorate the function with @tf.autograph.experimental.do_not_convert
在每个 epoch 之后弹出。
是的,我已经用@tf.autograph.experimental.do_not_convert 装饰了我拥有的每个功能,并且消息仍然弹出。我目前正在使用 TensorFlow 2.2.0
如果您知道发生这种情况的原因,那就太好了。我不知道“名称”是什么,因为在我的任何文件中都没有任何名称。
【问题讨论】:
标签: python python-3.x tensorflow keras