小编Jeh*_*oor的帖子

导入错误:无法从“tensorflow.python.eager.context”导入名称“get_config”

我的笔记本一直工作到今天。在我的 colab 笔记本开始时,我每晚安装 tf-night,但现在它给了我这个错误

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-589c442233c5> in <module>()
      7 import tensorflow as tf
      8 from tensorflow.keras import datasets, layers, models
----> 9 from keras.preprocessing import image
     10 from keras_preprocessing.image import ImageDataGenerator #check underscore or not
     11 from tensorflow.keras.preprocessing import image_dataset_from_directory

2 frames
/usr/local/lib/python3.7/dist-packages/keras/backend.py in <module>()
     35 from tensorflow.python.distribute import distribute_coordinator as dc
     36 from tensorflow.python.distribute import distribute_coordinator_context as dc_context
---> 37 from tensorflow.python.eager.context import get_config
     38 from tensorflow.python.framework import config
     39 from keras import …
Run Code Online (Sandbox Code Playgroud)

python keras tensorflow

12
推荐指数
6
解决办法
3万
查看次数

标签 统计

keras ×1

python ×1

tensorflow ×1