简体   繁体   English

我无法在 Google Colab 中测试 Tensorflow 对象检测 API 的安装

[英]I cannot test installation of the Tensorflow Object Detection API in Google Colab

I'm just starting to learn how to use the ML models in the Tensorflow Object Detection API on Google Colab and so I'm trying to follow the documentation very carefully.我刚刚开始学习如何在 Google Colab 上的 Tensorflow 对象检测 API 中使用 ML 模型,因此我正在尝试非常仔细地遵循文档。 After installing the libraries and packages, I'm testing the installation using the command from https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/install.html :安装库和包后,我正在使用https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/install.html中的命令测试安装:

python object_detection/builders/model_builder_tf2_test.py

But I get the following error:但我收到以下错误:

Traceback (most recent call last):
  File "object_detection/builders/model_builder_tf2_test.py", line 24, in <module>
    from object_detection.builders import model_builder
  File "/usr/local/lib/python3.7/dist-packages/object_detection/builders/model_builder.py", line 37, in <module>
    from object_detection.meta_architectures import deepmac_meta_arch
  File "/usr/local/lib/python3.7/dist-packages/object_detection/meta_architectures/deepmac_meta_arch.py", line 20, in <module>
    from object_detection.models.keras_models import resnet_v1
  File "/usr/local/lib/python3.7/dist-packages/object_detection/models/keras_models/resnet_v1.py", line 28, in <module>
    from keras.applications import resnet  # pylint:disable=g-import-not-at-top
  File "/usr/local/lib/python3.7/dist-packages/keras/__init__.py", line 25, in <module>
    from keras import models
  File "/usr/local/lib/python3.7/dist-packages/keras/models.py", line 20, in <module>
    from keras import metrics as metrics_module
  File "/usr/local/lib/python3.7/dist-packages/keras/metrics.py", line 27, in <module>
    from keras import activations
  File "/usr/local/lib/python3.7/dist-packages/keras/activations.py", line 20, in <module>
    from keras.layers import advanced_activations
  File "/usr/local/lib/python3.7/dist-packages/keras/layers/__init__.py", line 93, in <module>
    from keras.layers.core import Masking
  File "/usr/local/lib/python3.7/dist-packages/keras/layers/core/__init__.py", line 20, in <module>
    from keras.layers.core.dropout import Dropout
  File "/usr/local/lib/python3.7/dist-packages/keras/layers/core/dropout.py", line 26, in <module>
    class Dropout(base_layer.BaseRandomLayer):
AttributeError: module 'keras.engine.base_layer' has no attribute 'BaseRandomLayer' 

Even after importing keras version 2.0, it still not working, what I can do to solve this issue, thanks即使在导入 keras 2.0 版后,它仍然无法正常工作,我可以做些什么来解决这个问题,谢谢

Solved it: tensorflow version 2.5.0 is not compatible with the code provided.解决了:tensorflow 2.5.0 版本与提供的代码不兼容。 I had to install 2.8.0 so that it will work我必须安装 2.8.0 才能正常工作

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 Google Colab 上运行 TensorFlow 对象检测的问题 - Issues running Tensorflow Object Detection on Google Colab Tensorflow Object 检测 API 与 GPU 安装 - Tensorflow Object Detection API with GPU Installation Tensorflow:名为 lvis 的 google colab-no 模块上的对象检测 api 错误 - Tensorflow: Object detection api error on google colab-no module named lvis Tensorflow object 检测 API: CUDA_ERROR_OUT_OF_MEMORY on Google Colab - Tensorflow object detection API: CUDA_ERROR_OUT_OF_MEMORY on Google Colab Object 检测 Google Colab: AttributeError: module 'tensorflow' has no attribute 'contrib' - Object Detection Google Colab: AttributeError: module 'tensorflow' has no attribute 'contrib' 在 Windows 11 上安装 tensorflow 对象检测 API,卡在安装 pycocotools - Installing tensorflow object detection API on Windows 11, stuck on installation of pycocotools Google Colab 中的 Tensorflow 对象检测错误:模块“nets”没有属性“autograd” - Tensorflow Object detection in Google Colab error: module 'nets' has no attribute 'autograd' 设置TensorBoard以为Google Colab中的TensorFlow对象检测模型运行eval.py作业 - Set up TensorBoard to run eval.py job for TensorFlow object detection models in Google Colab Tensorflow对象检测API验证与测试集 - Tensorflow Object Detection API validation vs test set 使用 Tensorflow 的对象检测 API 评估测试数据时遇到问题 - Trouble evaluating test data with Tensorflow's Object Detection API
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM