(1)将原网络文件去掉(以下部分)
layer {
name: "data"
type: "Data"
top: "data"
top: "label"
include {
phase: TRAIN
}
transform_param {
crop_size: 227
mean_value: 104
mean_value: 117
mean_value: 123
}
data_param {
source: "D:/Master/master_graduate/dataset/test/squeezt-test1/train_LEVELDB"
batch_size: 32
backend: LEVELDB
}
}
layer {
name: "data"
type: "Data"
top: "data"
top: "label"
include {
phase: TEST
}
transform_param {
crop_size: 227
mean_value: 104
mean_value: 117
mean_value: 123
}
data_param {
source: "D:/Master/master_graduate/dataset/test/squeezt-test1/test_LEVELDB"
batch_size: 25
backend: LEVELDB
}
}
(2)将最后的accuracy和loss层去掉,如下部分
layer {
name: "loss"
type: "SoftmaxWithLoss"
bottom: "pool10"
bottom: "label"
top: "loss"
include {
phase: TRAIN
}
}
layer {
name: "accuracy"
type: "Accuracy"
bottom: "pool10"
bottom: "label"
top: "accuracy"
include {
phase: TEST
}
}
layer {
name: "accuracy_top5"
type: "Accuracy"
bottom: "pool10"
bottom: "label"
top: "accuracy_top5"
include {
phase: TEST
}
accuracy_param {
top_k: 5
}
}
(3)在最前面加如下部分:
name:"SqueezeNet"
input:"data"
input_shape{
dim:1
dim:1
dim:28
dim:28
}
(4)在最下面加如下部分:
layer {
name: "prob"
type: "SoftmaxWithLoss"
bottom: "pool10"
top: "prob"
}
其中,bottom是上一层的输出,top为“prob”。
OK,至此修改完毕。