我正试图从现有的检查点训练一个模型
instructions.
我使用faster_rcnn_resnet101_voc07.config配置获得configured对象检测训练管道.
在检查点部分,我已经设置了预定义模型faster_rcnn_resnet101_coco.tar.gz的检查点文件所在的目录
根据这个issue,fine_tune_checkpoint可以是包含三个文件的目录的路径:(.data-00000-of-00001,.index,.Meta).
所以我设置了目录“/ home / docs / car_dataset / models / model / train”的路径
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?
我也尝试过设置目录中每个文件的路径
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?
在具有三个文件的管道配置中定义预训练模型的正确方法是什么:(.data-00000-of-00001,.index,.Meta).
Tensorflow版本:1.2.1
解决方法:
你要做的是指定没有“.Meta”,“.index”和“.data-00000-of-00001”扩展名的整个路径.在您的情况下,这看起来是:
“/home/docs/car_dataset/models/model/train/model.ckpt”(你会注意到它比目录更具体).
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。