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

Related Posts

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注