tensorflow object detection--assign requires shapes of both tensors to match

31 篇文章 0 订阅
17 篇文章 0 订阅

最近在使用Object Detection中,出现assign requires shapes of both tensors to match

解决方法:
config中设置的model为官网上预训练的ckpt位置,

  fine_tune_checkpoint:     \ #这个是预训练好的模型位置
  "/object_detect/models/research/object_detection/ssd_inception_v2_coco_2018_01_28/model.ckpt"
  from_detection_checkpoint: true

把执行时存储的model_path 改为其他的路径

# From the tensorflow/models/research/ directory
PIPELINE_CONFIG_PATH={path to pipeline config file}  #config的路径
MODEL_DIR={path to model directory}  #这个一定是新的路径存放新训练的ckpt文件,不能和上面config中的model位置一样
#例如:‘/object_detect/models/research/object_detection/train_model’
NUM_TRAIN_STEPS=50000
SAMPLE_1_OF_N_EVAL_EXAMPLES=1
python object_detection/model_main.py \
    --pipeline_config_path=${PIPELINE_CONFIG_PATH} \
    --model_dir=${MODEL_DIR} \
    --num_train_steps=${NUM_TRAIN_STEPS} \
    --sample_1_of_n_eval_examples=$SAMPLE_1_OF_N_EVAL_EXAMPLES \
    --alsologtostderr
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值