我正在尝试使用Caffe开始培训图像分类网络。我想要一个解算器使用我自己的数据来训练模型。我正在使用
"ImageData"
layer
我准备了一个
'file_lists.txt'
文件
但我收到了这些错误信息。
E0211 10:43:12.274907 60653568 io.cpp:80] Could not open or find file /my/path/img/myfirstimage.jpg 123
F0211 10:49:29.643215 146333696 image_data_layer.cpp:148] Check failed: cv_img.data Could not load /my/path/img/myfirstimage.jpg 123
'myfirstimage.jpg'
中的第一个图像
'文件列表。txt'
和
123
是标签。我检查了文件是否在路径中
'/my/path/img/myfirstimage.jpg'
.
它似乎试图使用包含路径标签的字符串加载图像。从文档和示例来看,这不应该发生,除非我搞错了,但我什么都没看到。有人能帮忙吗?
mynet的开始。prototxt:
name: "mynet"
layer {
name: "data"
type: "ImageData"
top: "data"
top: "label"
image_data_param {
source: "/my/path/file_list.txt"
batch_size: 50
new_height: 256
new_width: 256
}
include {
phase: TRAIN
}
}
...
这里是
mynet_solver.prototxt
:
net: "/my/path/mynet.prototxt"
test_iter: 10
test_interval: 500
base_lr: 0.01
momentum: 0.9
weight_decay: 0.0000
lr_policy: "inv"
gamma: 0.0001
power: 0.75
display: 100
max_iter: 50000
snapshot: 5000
snapshot_prefix: "/my/path"
solver_mode: CPU
我使用的命令:
caffe train -solver ./mynet_solver.prototxt