標籤:

Tensorflow object detection API之faster_rcnn_resnet101_coco_2018_1_28 with TF 1.7出錯

當訓練faster_rcnn_resnet101_coco_2018_1_28時,運行如下命令

python object_detection/train.py

--logtostderr

--pipeline_config_path=${PATH_TO_YOUR_PIPELINE_CONFIG}

--train_dir=${PATH_TO_TRAIN_DIR}

出現錯誤:

ValueError: Tried to convert t to a tensor and failed. Error: Argument must be a dense tensor: range(0, 3) - got shape [3], but wanted []

出錯原因:python3的兼容問題

解決辦法:research/object_detection/utils/learning_schedules.py文件的 第167-169行由

rate_index = tf.reduce_max(tf.where(tf.greater_equal(global_step, boundaries),

range(num_boundaries),

[0] * num_boundaries))

改為

rate_index = tf.reduce_max(tf.where(tf.greater_equal(global_step, boundaries),

list(range(num_boundaries)),

[0] * num_boundaries))

推薦閱讀:

yolov3 強勢發布
深度學習之目標檢測的前世今生(Mask R-CNN)
目標檢測入門(三):基礎網路演進、分類與定位的權衡
目標檢測:SPPNet 論文閱讀
YOLOv3:An Incremental Improvement全文翻譯

TAG:目標檢測 |