【问题标题】:Fail to train custom model of Tensorflow from tf2 model无法从 tf2 模型训练 TensorFlow 的自定义模型
【发布时间】:2021-09-19 08:44:38
【问题描述】:

我想使用 Faster RCNN ResNet50 V1 训练我的自定义模型,并且我运行了以下命令:

Tensorflow/models/research/object_detection/model_main_tf2.py \
   --model_dir=Tensorflow/workspace/models/faster_rcnn_resnet50_v1 \
   --pipeline_config_path=Tensorflow/workspace/models/faster_rcnn_resnet50_v1/pipeline.config \
   --num_train_steps=2000

然后我得到以下错误:

File "/usr/local/lib/python3.7/dist-packages/object_detection/builders/model_builder.py", line 265, in _check_feature_extractor_exists
    'Tensorflow'.format(feature_extractor_type))
ValueError:  is not supported. See `model_builder.py` 
         for features extractors compatible with different versions of Tensorflow.

谁能帮帮我?

【问题讨论】:

    标签: python tensorflow tensorflow2.0 object-detection faster-rcnn


    【解决方案1】:

    您提供的信息告诉我,您的配置文件中的特征提取器的名称有误。正确的方法是在配置文件中指定特征提取器,如下所示:

    feature_extractor {
          type: 'faster_rcnn_resnet50_keras'
          batch_norm_trainable: true
        }
    

    如果您要在较小的数据集上进行微调,请将 batch_norm_trainable 设置为 false

    resnet50_V1 的正确配置文件示例是 here

    【讨论】:

      猜你喜欢
      • 2020-01-03
      • 1970-01-01
      • 2021-01-12
      • 1970-01-01
      • 2021-12-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-01-20
      相关资源
      最近更新 更多