无法从tf2模型训练tensorflow的自定义模型

von4xj4u  于 2021-08-20  发布在  Java
关注(0)|答案(1)|浏览(358)

我想使用更快的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.

有人能帮我吗?

c6ubokkw

c6ubokkw1#

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

feature_extractor {
      type: 'faster_rcnn_resnet50_keras'
      batch_norm_trainable: true
    }

设定 batch_norm_trainablefalse 如果要在较小的数据集上进行微调。
的右配置文件示例 resnet50_V1 在这里。

相关问题