зеркало из https://github.com/microsoft/caffe.git
Merge pull request #1039 from sergeyk/dev
[example] HDF5 classification
This commit is contained in:
Коммит
ef042f6def
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -0,0 +1,14 @@
|
|||
net: "examples/hdf5_classification/train_val.prototxt"
|
||||
test_iter: 1000
|
||||
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: CPU
|
|
@ -0,0 +1,14 @@
|
|||
net: "examples/hdf5_classification/train_val2.prototxt"
|
||||
test_iter: 1000
|
||||
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: CPU
|
|
@ -0,0 +1,59 @@
|
|||
name: "LogisticRegressionNet"
|
||||
layers {
|
||||
name: "data"
|
||||
type: HDF5_DATA
|
||||
top: "data"
|
||||
top: "label"
|
||||
hdf5_data_param {
|
||||
source: "examples/hdf5_classification/data/train.txt"
|
||||
batch_size: 10
|
||||
}
|
||||
include: { phase: TRAIN }
|
||||
}
|
||||
layers {
|
||||
name: "data"
|
||||
type: HDF5_DATA
|
||||
top: "data"
|
||||
top: "label"
|
||||
hdf5_data_param {
|
||||
source: "examples/hdf5_classification/data/test.txt"
|
||||
batch_size: 10
|
||||
}
|
||||
include: { phase: TEST }
|
||||
}
|
||||
layers {
|
||||
name: "fc1"
|
||||
type: INNER_PRODUCT
|
||||
bottom: "data"
|
||||
top: "fc1"
|
||||
blobs_lr: 1
|
||||
blobs_lr: 2
|
||||
weight_decay: 1
|
||||
weight_decay: 0
|
||||
inner_product_param {
|
||||
num_output: 2
|
||||
weight_filler {
|
||||
type: "gaussian"
|
||||
std: 0.01
|
||||
}
|
||||
bias_filler {
|
||||
type: "constant"
|
||||
value: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
layers {
|
||||
name: "loss"
|
||||
type: SOFTMAX_LOSS
|
||||
bottom: "fc1"
|
||||
bottom: "label"
|
||||
top: "loss"
|
||||
}
|
||||
layers {
|
||||
name: "accuracy"
|
||||
type: ACCURACY
|
||||
bottom: "fc1"
|
||||
bottom: "label"
|
||||
top: "accuracy"
|
||||
include: { phase: TEST }
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
name: "LogisticRegressionNet"
|
||||
layers {
|
||||
name: "data"
|
||||
type: HDF5_DATA
|
||||
top: "data"
|
||||
top: "label"
|
||||
hdf5_data_param {
|
||||
source: "examples/hdf5_classification/data/train.txt"
|
||||
batch_size: 10
|
||||
}
|
||||
include: { phase: TRAIN }
|
||||
}
|
||||
layers {
|
||||
name: "data"
|
||||
type: HDF5_DATA
|
||||
top: "data"
|
||||
top: "label"
|
||||
hdf5_data_param {
|
||||
source: "examples/hdf5_classification/data/test.txt"
|
||||
batch_size: 10
|
||||
}
|
||||
include: { phase: TEST }
|
||||
}
|
||||
layers {
|
||||
name: "fc1"
|
||||
type: INNER_PRODUCT
|
||||
bottom: "data"
|
||||
top: "fc1"
|
||||
blobs_lr: 1
|
||||
blobs_lr: 2
|
||||
weight_decay: 1
|
||||
weight_decay: 0
|
||||
inner_product_param {
|
||||
num_output: 40
|
||||
weight_filler {
|
||||
type: "gaussian"
|
||||
std: 0.01
|
||||
}
|
||||
bias_filler {
|
||||
type: "constant"
|
||||
value: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
layers {
|
||||
name: "relu1"
|
||||
type: RELU
|
||||
bottom: "fc1"
|
||||
top: "fc1"
|
||||
}
|
||||
layers {
|
||||
name: "fc2"
|
||||
type: INNER_PRODUCT
|
||||
bottom: "fc1"
|
||||
top: "fc2"
|
||||
blobs_lr: 1
|
||||
blobs_lr: 2
|
||||
weight_decay: 1
|
||||
weight_decay: 0
|
||||
inner_product_param {
|
||||
num_output: 2
|
||||
weight_filler {
|
||||
type: "gaussian"
|
||||
std: 0.01
|
||||
}
|
||||
bias_filler {
|
||||
type: "constant"
|
||||
value: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
layers {
|
||||
name: "loss"
|
||||
type: SOFTMAX_LOSS
|
||||
bottom: "fc2"
|
||||
bottom: "label"
|
||||
top: "loss"
|
||||
}
|
||||
layers {
|
||||
name: "accuracy"
|
||||
type: ACCURACY
|
||||
bottom: "fc2"
|
||||
bottom: "label"
|
||||
top: "accuracy"
|
||||
include: { phase: TEST }
|
||||
}
|
Загрузка…
Ссылка в новой задаче