cannot import name 'tf_inspect' from 'tensorflow.python.keras.utils

 

报错:

from tensorflow.python.keras.utils import tf_inspect
ImportError: cannot import name 'tf_inspect' from 'tensorflow.python.keras.utils' (/home/deeplp/anaconda3/lib/python3.8/site-packages/tensorflow/python/keras/utils/__init__.py)

 

 

解法:

将:

from tensorflow.python.keras.utils import tf_inspect

修改为

from tensorflow.python.util import tf_inspect
上一篇:SQL语言练习2


下一篇:2022-2023年英语周报七年级第26期答案汇总