【问题标题】:Resume training faster-rccn model from the last step after the interrupted session on Google Colab在 Google Colab 上的会话中断后从最后一步恢复训练 faster-rcnn 模型
【发布时间】:2021-03-25 18:24:13
【问题描述】:
使用 faster-rcnn 在 Google Colab 上训练我的模型。但是,由于 GPU 时间限制,我的模型在 10,000 步中的 7000 步停止训练。
我使用以下代码来训练模型
!python model_main_tf2.py --model_dir=models/my_faster_rcnn_inception_resnet_v2 --pipeline_config_path=models/my_faster_rcnn_inception_resnet_v2/pipeline.config
如何从最后一步(即 7000)继续训练我的模型?
【问题讨论】:
标签:
python
tensorflow
google-colaboratory
faster-rcnn
【解决方案1】:
在遵循this 教程后,我设法弄明白了。因此,为了恢复训练,我将fine_tune_checkpoint 的目录位置从预训练模型目录(即pretrained_mode/checkpoint/ckpt-0)更改为保存模型检查点的模型训练目录位置(即/my_training_model/ckpt-#) . 将 # 替换为最后一个 ckpt 的编号,例如ckpt-9
然后我重新运行以下命令以恢复训练:
!python model_main_tf2.py --model_dir=models/my_faster_rcnn_inception_resnet_v2 --pipeline_config_path=models/my_faster_rcnn_inception_resnet_v2/pipeline.config