【问题标题】:Error parsing text-format caffe.NetParameter: 9:24: Message type "caffe.LayerParameter" has no field named "image_pair_data_param"解析文本格式 caffe.NetParameter 时出错:9:24:消息类型“caffe.LayerParameter”没有名为“image_pair_data_param”的字段
【发布时间】:2018-04-26 06:51:50
【问题描述】:

我正在尝试使用 windows 系统训练 caffe 模型。 但是,当我使用“caffe.exe train --solver=d:/tools/config/fcn_solver.prototxt”时,出现了问题。

errors:
[libprotobuf ERROR ..\src\google\protobuf\text_format.cc:274] Error parsing 
text-format caffe.NetParameter: 9:24: Message type "caffe.LayerParameter" 
has no field named "image_pair_data_param".
F1225 21:16:49.415436  5732 upgrade_proto.cpp:79] Check failed: 
ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: 
D:/tools/config/fcn.prototxt

我知道消息可能显示我的 fcn.prototxt 在第 9 行有错误。

   name: "fcn"


   layer {
   name: "pairdata"
   type: "ImagePairData"
   top: "data"
   top: "label"
   image_pair_data_param{
   image_dir: "/AerialImageDataset/train/images"
   label_dir: "/AerialImageDataset/train/gt"
   batch_size: 10
   h_img: 256
   w_img: 256
   h_map: 256
   w_map: 256
   channels: 3
   mean: 0
   scale: 1
   multiclass: false
   }

   include: {phase: TRAIN}
   }

I have no idea what's wrong with my image_pair_data_param. I have tried using the absolute path, but it is no work.
I am using the vs2013 ,anaconda3 and win10.
By the way, the training model is from https://github.com/emaggiori/CaffeRemoteSensing/tree/master/InriaBenchmark 

【问题讨论】:

    标签: python windows deep-learning caffe


    【解决方案1】:

    您使用的是什么版本的 caffe?你从哪里得到这个模型的?

    默认的 caffe 版本在 caffe.proto 文件中没有定义 image_pair_data_param,您应该查看用于训练此模型的 caffe 分支,并查看该分支中对 caffe.proto 进行了哪些修改。

    【讨论】:

    • 我认为我的 caffe 是 1.0 版。我从 github 下载它,然后用 vs 2013 编译它。我从 github github.com/emaggiori/CaffeRemoteSensing/tree/master/… 得到模型。我知道 image_pair_data_param 是作者添加的新图层。我已经在 caffe.proto 中检查过,它已经定义了它,所以这个层应该可以包含。
    • 没有。您需要编译与所用模型的作者相同版本的 caffe。你需要用 his caffe.proto 编译。
    • @9576alice please.see.my comment
    猜你喜欢
    • 2019-07-06
    • 2017-08-04
    • 2016-02-17
    • 2023-01-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-10-16
    • 2021-06-19
    相关资源
    最近更新 更多