与tensorflow和keras不兼容的包装

2024-09-29 21:40:59 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在运行mask rcnn github存储库,我已经按照他的存储库要求安装了包,但是如果我导入keras,它会给我错误信息。我在笔记本上安装的软件包如下所示:

ipykernel==5.5.3
ipyparallel==6.3.0
ipython==7.16.1
ipython-genutils==0.2.0
ipywidgets==6.0.0
jedi==0.18.0
Jinja2==2.10
joblib==1.0.1
jupyterlab-pygments==0.1.2
Keras==2.2.5
Keras-Applications==1.0.8
keras-nightly==2.5.0.dev2021032900
Keras-Preprocessing==1.1.2
keyring==10.6.0
keyrings.alt==3.0
opencv-python==4.5.2.54
Pillow==8.2.0
prometheus-client==0.11.0
prompt-toolkit==3.0.18
protobuf==3.17.2
ptyprocess==0.7.0
system-service==0.3
systemd-python==234
tensorboard==2.5.0
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.8.0
tensorflow==2.5.0
tensorflow-estimator==2.5.0
termcolor==1.1.0
terminado==0.10.0

代码:

import keras 
keras.__version__

输出:

AttributeError: module 'tensorflow.compat.v2.__internal__' has no attribute 'tf2'

掩码RCNN存储库链接

https://github.com/matterport/Mask_RCNN

Tags: githubtensorflowipython笔记本maskkerastensorboardjedi

热门问题