如何配置 Caffe deploy.prototxt?
How to configure Caffe deploy.prototxt?
我在这个 上遵循了@ypx 的说明。现在我想预测一些图片。所以我正在使用:
MODEL_FILE = '/tmp/deploy.prototxt'
PRETRAINED = '/tmp/ck.caffemodel'
IMAGE_FILE = '/tmp/img.png'
net = caffe.Classifier(MODEL_FILE, PRETRAINED, image_dims=(200, 200))
但我收到这条消息:
I1002 13:49:24.331648 28172 net.cpp:435] Input 0 -> data
I1002 13:49:24.331667 28172 layer_factory.hpp:76] Creating layer data
I1002 13:49:24.332259 28172 net.cpp:110] Creating Layer data
F1002 13:49:24.332272 28172 net.cpp:427] Top blob 'data' produced by multiple sources.
*** Check failure stack trace: ***
我认为我的问题出在我的 deploy.prototxt 文件上。 This is my deploy.prototxt and This is my train.prototxt
有人可以帮我配置我的部署文件吗?
您应该从部署网络中删除训练输入层(第 8--21 行)。
即丢弃这个:
layer {
name: "data"
type: "Data"
top: "data"
top: "label"
transform_param {
scale: 0.00392156862745
}
data_param {
source: "/tmp/db"
batch_size: 64
backend: LMDB
}
}
我在这个
MODEL_FILE = '/tmp/deploy.prototxt'
PRETRAINED = '/tmp/ck.caffemodel'
IMAGE_FILE = '/tmp/img.png'
net = caffe.Classifier(MODEL_FILE, PRETRAINED, image_dims=(200, 200))
但我收到这条消息:
I1002 13:49:24.331648 28172 net.cpp:435] Input 0 -> data
I1002 13:49:24.331667 28172 layer_factory.hpp:76] Creating layer data
I1002 13:49:24.332259 28172 net.cpp:110] Creating Layer data
F1002 13:49:24.332272 28172 net.cpp:427] Top blob 'data' produced by multiple sources.
*** Check failure stack trace: ***
我认为我的问题出在我的 deploy.prototxt 文件上。 This is my deploy.prototxt and This is my train.prototxt
有人可以帮我配置我的部署文件吗?
您应该从部署网络中删除训练输入层(第 8--21 行)。
即丢弃这个:
layer {
name: "data"
type: "Data"
top: "data"
top: "label"
transform_param {
scale: 0.00392156862745
}
data_param {
source: "/tmp/db"
batch_size: 64
backend: LMDB
}
}