2017-08-15 39 views
3

我试图从现有检查点跟随这些 instructions来训练模型。张量流对象检测从现有检查点微调模型

我有configured对象检测训练管道使用faster_rcnn_resnet101_voc07.config配置。

在检查站段我已经设置,其中位于预训练模型faster_rcnn_resnet101_coco.tar.gz

Acording的的检查点文件,这issuefine_tune_checkpoint可以是包含三个文件的目录路径的目录:(。 data-00000-of-00001,.index,.meta)。

所以我设置的目录路径 “的/ home /文档/ car_dataset /模型/模型/火车

gradient_clipping_by_norm: 10.0 
    fine_tune_checkpoint: "/home/docs/car_dataset/models/model/train" 
    from_detection_checkpoint: true 
    num_steps: 800000 
    data_augmentation_options { 
    random_horizontal_flip { 
    } 
    } 

然而,当我执行脚本的训练:

python object_detection/train.py  --logtostderr\ 
--pipeline_config_path=/home/docs/car_dataset/models/model/faster_rcnn_resnet101_voc07.config\ 
--train_dir=/home/docs/car_dataset/models/model/train\ 
--num_gpus=2 

我得到了错误:

tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file /home/docs/car_dataset/models/model/train: Failed precondition: /home/docs/car_dataset/models/model/train: perhaps your file is in a different file format and you need to use a different restore operator? 

我也试过设置pa TH到每个文件在目录

fine_tune_checkpoint: "/home/docs/car_dataset/models/model/train/model.ckpt.meta" 

,但我得到的错误:

tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file /home/docs/car_dataset/models/model/train/model.ckpt.meta: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator? 

什么是定义在具有三个文件管道配置训练模型前的正确方法:(。数据-00001,-index,.meta)。

Tensorflow版本: 1.2.1

回答

5

你所要做的就是没有 “.META”, “的.index” 和”。数据00000-的-00001" 扩展到指定的完整路径。在你的情况,这看起来是: “/home/docs/car_dataset/models/model/train/model.ckpt”(你会注意到比目录更具体)。

相关问题