问题遇到的现象和发生背景
运行验证文件
VERIFICATION_SCRIPT = os.path.join(paths['APIMODEL_PATH'], 'research', 'object_detection', 'builders', 'model_builder_tf2_test.py')
# Verify Installation
!python {VERIFICATION_SCRIPT}
出现问题查了有说是版本不匹配问题
问题相关代码,请勿粘贴截图
VERIFICATION_SCRIPT = os.path.join(paths['APIMODEL_PATH'], 'research', 'object_detection', 'builders', 'model_builder_tf2_test.py')
# Verify Installation
!python {VERIFICATION_SCRIPT}
运行结果及报错内容
tensorflow.python.framework.errors_impl.AlreadyExistsError: Another metric with the same name already exists.
我的解答思路和尝试过的方法
查了版本没问题啊
C:\Users\ZZH>pip show tensorflow
Name: tensorflow
Version: 2.8.0
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: packages@tensorflow.org
License: Apache 2.0
Location: d:\anaconda new\lib\site-packages\tensorflow-2.8.0-py3.9-win-amd64.egg
Requires: absl-py, astunparse, flatbuffers, gast, google-pasta, grpcio, h5py, keras, keras-preprocessing, libclang, numpy, opt-einsum, protobuf, setuptools, six, tensorboard, tensorflow-io-gcs-filesystem, termcolor, tf-estimator-nightly, typing-extensions, wrapt
Required-by: tensorflow-text, tf-models-official
C:\Users\ZZH>pip show keras
Name: keras
Version: 2.8.0
Summary: Deep learning for humans.
Home-page: https://keras.io/
Author: Keras team
Author-email: keras-users@googlegroups.com
License: Apache 2.0
Location: d:\anaconda new\lib\site-packages
Requires:
Required-by: object-detection, tensorflow, tensorflow-gpu
然后试了安装2.6.0版本居然可以运行
C:\Users\ZZH>pip uninstall keras
Found existing installation: keras 2.8.0
Uninstalling keras-2.8.0:
Would remove:
d:\anaconda new\lib\site-packages\keras-2.8.0.dist-info*
d:\anaconda new\lib\site-packages\keras*
Proceed (Y/n)? y
Successfully uninstalled keras-2.8.0
C:\Users\ZZH>pip install keras==2.6.0
但是
tensorflow 2.8.0 requires keras<2.9,>=2.8.0rc0, but you have keras 2.6.0 which is incompatible.
又咋办嘛
我想要达到的结果
求解答