Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/146.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 导入hdf5文件以在caffe中训练hdf5_分类时出错_C++_Caffe_Hdf5 - Fatal编程技术网

C++ 导入hdf5文件以在caffe中训练hdf5_分类时出错

C++ 导入hdf5文件以在caffe中训练hdf5_分类时出错,c++,caffe,hdf5,C++,Caffe,Hdf5,这是我的日志 Log file created at: 2016/04/29 14:01:52 Running on machine: DELL Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg F0429 14:01:52.191473 14832 upgrade_proto.cpp:79] Check failed: ReadProtoFromTextFile(param_file,

这是我的日志

Log file created at: 2016/04/29 14:01:52
    Running on machine: DELL
    Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
    F0429 14:01:52.191473 14832 upgrade_proto.cpp:79] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: examples/hdf5_classification/nonlinear_auto_train.prototxt
这是我的球棒

.\bin\caffe.exe train --solver=D:\caffe-windows-master\examples\hdf5_classification\nonlinear_solver.prototxt
pause
这是我的非线性解算器.prototxt

train_net: "examples/hdf5_classification/nonlinear_auto_train.prototxt"
#test_net: "examples/hdf5_classification/nonlinear_auto_test.prototxt"
#test_iter: 250
#test_interval: 1000
base_lr: 0.01
lr_policy: "step"
gamma: 0.1
stepsize: 5000
display: 1000
max_iter: 10000
momentum: 0.9
weight_decay: 0.0005
snapshot: 10000
snapshot_prefix: "examples/hdf5_classification/data/train"
solver_mode: GPU
这是我的非线性自动列车

layer {
  name: "data"
  type: "HDF5Data"
  top: "data"
  top: "label"
  hdf5_data_param {
    source: "D:\caffe-windows-master\examples/hdf5_classification/data/list.txt"
    batch_size: 10
  }
}
layer {
  name: "ip1"
  type: "InnerProduct"
  bottom: "data"
  top: "ip1"
  inner_product_param {
    num_output: 40
    weight_filler {
      type: "xavier"
    }
  }
}
layer {
  name: "relu1"
  type: "ReLU"
  bottom: "ip1"
  top: "ip1"
}
layer {
  name: "ip2"
  type: "InnerProduct"
  bottom: "ip1"
  top: "ip2"
  inner_product_param {
    num_output: 2
    weight_filler {
      type: "xavier"
    }
  }
}
layer {
  name: "accuracy"
  type: "Accuracy"
  bottom: "ip2"
  bottom: "label"
  top: "accuracy"
}
layer {
  name: "loss"
  type: "SoftmaxWithLoss"
  bottom: "ip2"
  bottom: "label"
  top: "loss"
}
代码在windows上运行

首先,我找不到D:\ThirdPartyLibrary

第二,h5文件已保存在适当的文件夹中

第三,我为每个文件使用绝对路径

我不知道为什么代码运行不正常

您收到一条错误消息“无法解析[…]train.prototxt”。
这表明train.prototxt文件中存在语法错误。
我会怀疑这条线

因为它混合了斜杠和反斜杠。
尝试:

您收到一条错误消息“未能解析[…]train.prototxt”。
这表明train.prototxt文件中存在语法错误。
我会怀疑这条线

因为它混合了斜杠和反斜杠。
尝试:


复制并在此处粘贴日志,而不是使用图像。另外,请提供更多信息,通过分享您在prototxt文件中所做的编辑,以了解真正的问题谢谢您的建议,我已经更改了描述。非线性求解器中“train\u net”的值中的反斜杠“/”而不是反斜杠“\”。prototxt我如您所说更改了它,但它仍然处于相同的错误情况。复制并粘贴日志,而不是使用图像。另外,请提供更多信息,通过分享您在prototxt文件中所做的编辑,以了解真正的问题。我已经更改了描述。非线性求解器中“train\u net”的值中的反斜杠“/”而不是反斜杠“\”。prototxt我如您所说更改了它,但仍然处于相同的错误情况。
source: "D:\caffe-windows-master\examples/hdf5_classification/data/list.txt"
source: "D:/caffe-windows-master/examples/hdf5_classification/data/list.txt"