Image processing Caffe错误:没有名为“的字段”;净额; 我在我的计算机上使用了CaseC++的例子程序,但是在最近重新编译CAFE之后,当我试着运行这个程序时,我遇到了这个错误:

Image processing Caffe错误:没有名为“的字段”;净额; 我在我的计算机上使用了CaseC++的例子程序,但是在最近重新编译CAFE之后,当我试着运行这个程序时,我遇到了这个错误:,image-processing,machine-learning,neural-network,deep-learning,caffe,Image Processing,Machine Learning,Neural Network,Deep Learning,Caffe,[libprotobuf ERROR google/protobuf/text_format.cc:245]错误解析 文本格式caffe.NetParameter:2:4:消息类型“caffe.NetParameter” 没有名为“net”的字段。 升级协议.cpp:928]检查失败:ReadProtoFromTextFile(参数文件, param)无法分析NetParameter文件: /home/jack/Desktop/beeshing/deploy.prototxt 我是否遗漏了什么,

[libprotobuf ERROR google/protobuf/text_format.cc:245]错误解析 文本格式caffe.NetParameter:2:4:消息类型“caffe.NetParameter” 没有名为“net”的字段。
升级协议.cpp:928]检查失败:ReadProtoFromTextFile(参数文件, param)无法分析NetParameter文件: /home/jack/Desktop/beeshing/deploy.prototxt

我是否遗漏了什么,或者prototxt文件的语法是否已更改?我的部署.Pototxt文件(我传递给C++程序)看起来像这样:

# The train/test net protocol buffer definition
net: "/home/jack/Desktop/beeshiny/deploy_arch.prototxt"
# test_iter specifies how many forward passes the test should carry out.
# In the case of MNIST, we have test batch size 100 and 100 test iterations,
# covering the full 10,000 testing images.
test_iter: 100
# Carry out testing every 500 training iterations.
test_interval: 500
# The base learning rate, momentum and the weight decay of the network.
base_lr: 0.01
momentum: 0.9
weight_decay: 0.0005
# The learning rate policy
lr_policy: "inv"
gamma: 0.0001
power: 0.75
# Display every 100 iterations
display: 100
# The maximum number of iterations
max_iter: 10000
# snapshot intermediate results
snapshot: 5000
snapshot_prefix: "lenet"
# solver mode: CPU or GPU
solver_mode: CPU
上面prototxt文件中引用的deploy_arch.prototxt文件的内容:

name: "LeNet"
input: "data"
input_shape {
  dim: 10
  dim: 1
  dim: 24
  dim: 24
}
layer {
  name: "conv1"
  type: "Convolution"
  bottom: "data"
  top: "conv1"
  param {
    lr_mult: 1
  }
  param {
    lr_mult: 2
  }
  convolution_param {
    num_output: 20
    kernel_size: 5
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
    }
  }
}
layer {
  name: "pool1"
  type: "Pooling"
  bottom: "conv1"
  top: "pool1"
  pooling_param {
    pool: MAX
    kernel_size: 2
    stride: 2
  }
}
layer {
  name: "conv2"
  type: "Convolution"
  bottom: "pool1"
  top: "conv2"
  param {
    lr_mult: 1
  }
  param {
    lr_mult: 2
  }
  convolution_param {
    num_output: 50
    kernel_size: 5
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
    }
  }
}
layer {
  name: "pool2"
  type: "Pooling"
  bottom: "conv2"
  top: "pool2"
  pooling_param {
    pool: MAX
    kernel_size: 2
    stride: 2
  }
}
layer {
  name: "ip1"
  type: "InnerProduct"
  bottom: "pool2"
  top: "ip1"
  param {
    lr_mult: 1
  }
  param {
    lr_mult: 2
  }
  inner_product_param {
    num_output: 500
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
    }
  }
}
layer {
  name: "relu1"
  type: "ReLU"
  bottom: "ip1"
  top: "ip1"
}
layer {
  name: "ip2"
  type: "InnerProduct"
  bottom: "ip1"
  top: "ip2"
  param {
    lr_mult: 1
  }
  param {
    lr_mult: 2
  }
  inner_product_param {
    num_output: 3
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
    }
  }
}
layer {
  name: "loss"
  type: "Softmax"
  bottom: "ip2"
  top: "loss"
}

我不明白为什么突然停止工作了,除非更新使我的prototxt文件过时?

我通过在
$PYTHONPATH
中添加
caffe/python
解决了我的问题,错误消息是关于
…beeshing/deploy.prototxt
,而解算器有
../deploy\u arch.prototxt
-这可能相关吗?你能展示部署模型的前几行吗?非常感谢Shai,我用另一个原型文件更新了这个问题,并明确了我传递给C++程序的哪一个。你的代码>部署。你的分类器需要一个网络描述,因此无法解析解算器。你是对的,我又完全搞混了,非常感谢你的帮助,并为基本错误道歉。