属性错误:模块"张量流"在更新后没有属性"python"错误



在更新到2.6后,我使用了tf 2.3,得到了以下错误

属性错误:模块"tensorflow"没有属性"python"

行:

if S.__class__ == tf.python.framework.ops.EagerTensor:

我找到的解决方案是:

import tensorflow.python.framework.ops as tf_ops
...
if S.__class__ == tf_ops.EagerTensor:

最新更新