问题:
import tensorflow_addons as tfa
ImportError: cannot import name 'keras_tensor' from 'tensorflow.python.keras.engine'
解决方法:
这是TensorFlow, Python and tensorflow-addons版本不匹配引起的
按照以下安装相应版本:

遇到ImportError: cannot import name 'keras_tensor' from 'tensorflow.python.keras.engine'的错误?这通常是因为TensorFlow、TensorFlow-Addons和Python之间的版本不兼容。修复此问题,你需要确保安装的TensorFlow、TensorFlow-Addons和Python版本相互匹配。按照官方推荐的版本进行安装,例如安装TensorFlow 2.x和对应兼容的tensorflow-addons版本,可以有效解决此类问题。
问题:
import tensorflow_addons as tfa
ImportError: cannot import name 'keras_tensor' from 'tensorflow.python.keras.engine'
解决方法:
这是TensorFlow, Python and tensorflow-addons版本不匹配引起的
按照以下安装相应版本:

您可能感兴趣的与本文相关的镜像
Python3.9
Python 是一种高级、解释型、通用的编程语言,以其简洁易读的语法而闻名,适用于广泛的应用,包括Web开发、数据分析、人工智能和自动化脚本
2030
2328
3447
1万+
6633

被折叠的 条评论
为什么被折叠?