gpt4 book ai didi

python-3.x - 模块 'tensorflow_core.compat.v2' 没有属性 '__internal__'

转载 作者:行者123 更新时间:2023-12-04 07:38:48 24 4
gpt4 key购买 nike

我正在使用 python 3.6.9keras 2.3.1 和 (tf 2.0.0tf 2.1. 0)。从此table获取兼容版本.

当我导入 keras 时,出现此错误。

enter image description here

最佳答案

错误:

AttributeError: module 'tensorflow_core.compat.v2' has no attribute '__internal__'

解决方案:

安装库

!pip install tensorflow==2.1
!pip install keras==2.3.1

导入

from tensorflow import keras

关于python-3.x - 模块 'tensorflow_core.compat.v2' 没有属性 '__internal__',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67599535/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com