私はこのような奥行き推定の完全convotuionalネットワークが今カフェ損失層、平均および精度
# input: image and depth_image
layer {
name: "train-data"
type: "Data"
top: "data"
top: "silence_1"
include {
phase: TRAIN
}
transform_param {
#mean_file: "mean_train.binaryproto"
scale: 0.00390625
}
data_param {
source: "/train_lmdb"
batch_size: 4
backend: LMDB
}
}
layer {
name: "train-depth"
type: "Data"
top: "depth"
top: "silence_2"
include {
phase: TRAIN
}
transform_param {
scale: 0.00390625
}
data_param {
source: "train_depth_lmdb"
batch_size: 4
backend: LMDB
}
}
layer {
name: "val-data"
type: "Data"
top: "data"
top: "silence_1"
include {
phase: TEST
}
transform_param {
#mean_file: "mean_val.binaryproto"
scale: 0.00390625
}
data_param {
source: "val_lmdb"
batch_size: 4
backend: LMDB
}
}
layer {
name: "val-depth"
type: "Data"
top: "depth"
top: "silence_2"
include {
phase: TEST
}
transform_param {
scale: 0.00390625
}
data_param {
source: "val_depth_lmdb"
batch_size: 4
backend: LMDB
}
}
################## Silence unused labels ##################
layer {
name: "silence_layer_1"
type: "Silence"
bottom: "silence_1"
}
layer {
name: "silence_layer_2"
type: "Silence"
bottom: "silence_2"
}
....
layer {
name: "conv"
type: "Convolution"
bottom: "concat"
top: "conv"
convolution_param {
num_output: 1
kernel_size: 5
pad: 2
stride: 1
engine: CUDNN
weight_filler {
type: "gaussian"
std: 0.01
}
bias_filler {
type: "constant"
value: 0
}
}
}
layer {
name: "relu"
type: "ReLU"
bottom: "conv"
top: "result"
relu_param{
negative_slope: 0.01
engine: CUDNN
}
}
# Error
layer {
name: "accuracy"
type: "Accuracy"
bottom: "result"
bottom: "depth"
top: "accuracy"
include {
phase: TEST
}
}
layer {
name: "loss"
type: "EuclideanLoss"
bottom: "result"
bottom: "depth"
top: "loss"
}
私は3つの質問を持っている:
ネットワークをトレーニングしているとき、精度レイヤーは常に1です。理由はわかりませんか?
ユークリッド層はこの目的のための正しいレイヤーですか?
このような場合に必要な平均値か、平均値を無視できますか?
#Define image transformers
transformer = caffe.io.Transformer({'data': net.blobs['data'].data.shape})
transformer.set_mean('data', mean_array)
transformer.set_transpose('data', (2,0,1))
image = "test.png"
img = caffe.io.load_image(image, False)
img = caffe.io.resize_image(img, (IMAGE_WIDTH, IMAGE_HEIGHT))
net.blobs['data'].data[...] = transformer.preprocess('data', img)
pred = net.forward()
output_blob = pred['result']
これを「深い学習」とタグ付けしましたか? – MSalters
はい、申し訳ありません私はそれを編集しました – thigi