解析文本格式时出错caffe.NetParameter:9:24:消息类型" caffe.LayerParameter"没有名为" image_pair_data_param"

时间:2017-12-25 13:33:52

标签: python windows deep-learning caffe

我正在尝试使用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

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

   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 

1 个答案:

答案 0 :(得分:0)

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

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