why is the accuracy=0%? (Lenet Model)

37 views
Skip to first unread message

Chias JaJa

unread,
May 17, 2016, 5:53:31 AM5/17/16
to Caffe Users
I use the Lenet model and picture's height is 13, width is 79.
Total:1000000 pic , two classes.
Training Data is 800000 pic, Testing Data is 200000 pic, have two classes.
The accuracy could at least have 50%.
why is accuracy=0%?

solver.prototxt:
net: "examples/mytry/lenet_train_test.prototxt"
test_iter: 2000
test_interval: 5000
base_lr: 0.001
momentum: 0.9
weight_decay: 0.005
lr_policy: "inv"
gamma: 0.1
power: 0.75
display: 1000
max_iter: 50000
snapshot: 50000
snapshot_prefix: "examples/mytry/lenet"
solver_mode: CPU

train_test.prototxt:(The part of change)
data_param {
source: "examples/mytry/img_train_lmdb"
batch_size: 64
backend: LMDB
}

data_param {
source: "examples/mytry/img_test_lmdb"
batch_size: 100
backend: LMDB
}

inner_product_param {
num_output: 2 #change 2 instead of 10
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
}
}

Result:
I0515 15:19:19.808574 3082 solver.cpp:340] Iteration 40000, Testing net (#0)
I0515 15:21:53.017040 3082 solver.cpp:408] Test net output #0: accuracy = 0
I0515 15:21:53.017160 3082 solver.cpp:408] Test net output #1: loss = 1.18128 (* 1 = 1.18128 loss)
I0515 15:21:53.190886 3082 solver.cpp:236] Iteration 40000, loss = 0.690025
I0515 15:21:53.190979 3082 solver.cpp:252] Train net output #0: loss = 0.690025 (* 1 = 0.690025 loss)
I0515 15:21:53.190997 3082 sgd_solver.cpp:106] Iteration 40000, lr = 1.9878e-06
I0515 15:23:57.154177 3082 solver.cpp:236] Iteration 41000, loss = 2.02741
I0515 15:23:57.154613 3082 solver.cpp:252] Train net output #0: loss = 2.02741 (* 1 = 2.02741 loss)
I0515 15:23:57.154708 3082 sgd_solver.cpp:106] Iteration 41000, lr = 1.95134e-06
I0515 15:26:02.495137 3082 solver.cpp:236] Iteration 42000, loss = 0.667163
I0515 15:26:02.495523 3082 solver.cpp:252] Train net output #0: loss = 0.667163 (* 1 = 0.667163 loss)
I0515 15:26:02.495620 3082 sgd_solver.cpp:106] Iteration 42000, lr = 1.9164e-06
I0515 15:28:08.543061 3082 solver.cpp:236] Iteration 43000, loss = 2.0478
I0515 15:28:08.543457 3082 solver.cpp:252] Train net output #0: loss = 2.0478 (* 1 = 2.0478 loss)
I0515 15:28:08.543597 3082 sgd_solver.cpp:106] Iteration 43000, lr = 1.88288e-06
I0515 15:30:15.492943 3082 solver.cpp:236] Iteration 44000, loss = 0.709838
I0515 15:30:15.493360 3082 solver.cpp:252] Train net output #0: loss = 0.709839 (* 1 = 0.709839 loss)
I0515 15:30:15.493500 3082 sgd_solver.cpp:106] Iteration 44000, lr = 1.8507e-06
I0515 15:32:20.894922 3082 solver.cpp:340] Iteration 45000, Testing net (#0)
I0515 15:34:54.668030 3082 solver.cpp:408] Test net output #0: accuracy = 0
I0515 15:34:54.668329 3082 solver.cpp:408] Test net output #1: loss = 1.17161 (* 1 = 1.17161 loss)
I0515 15:34:54.808615 3082 solver.cpp:236] Iteration 45000, loss = 0.691562
I0515 15:34:54.808704 3082 solver.cpp:252] Train net output #0: loss = 0.691562 (* 1 = 0.691562 loss)
I0515 15:34:54.808724 3082 sgd_solver.cpp:106] Iteration 45000, lr = 1.81978e-06
I0515 15:36:58.802649 3082 solver.cpp:236] Iteration 46000, loss = 0.668188
I0515 15:36:58.803174 3082 solver.cpp:252] Train net output #0: loss = 0.668188 (* 1 = 0.668188 loss)
I0515 15:36:58.803314 3082 sgd_solver.cpp:106] Iteration 46000, lr = 1.79003e-06
I0515 15:39:03.794693 3082 solver.cpp:236] Iteration 47000, loss = 0.71103
I0515 15:39:03.795116 3082 solver.cpp:252] Train net output #0: loss = 0.711029 (* 1 = 0.711029 loss)
I0515 15:39:03.795261 3082 sgd_solver.cpp:106] Iteration 47000, lr = 1.7614e-06
I0515 15:41:08.893612 3082 solver.cpp:236] Iteration 48000, loss = 0.663108
I0515 15:41:08.893971 3082 solver.cpp:252] Train net output #0: loss = 0.663108 (* 1 = 0.663108 loss)
I0515 15:41:08.894016 3082 sgd_solver.cpp:106] Iteration 48000, lr = 1.73381e-06
I0515 15:43:13.983155 3082 solver.cpp:236] Iteration 49000, loss = 0.671532
I0515 15:43:13.983533 3082 solver.cpp:252] Train net output #0: loss = 0.671532 (* 1 = 0.671532 loss)
I0515 15:43:13.983672 3082 sgd_solver.cpp:106] Iteration 49000, lr = 1.70721e-06
I0515 15:45:18.354498 3082 solver.cpp:461] Snapshotting to binary proto file examples/mytry/lenet_iter_50000.caffemodel
I0515 15:45:18.385054 3082 sgd_solver.cpp:269] Snapshotting solver state to binary proto file examples/mytry/lenet_iter_50000.solverstate
I0515 15:45:18.457027 3082 solver.cpp:320] Iteration 50000, loss = 2.02316
I0515 15:45:18.457109 3082 solver.cpp:340] Iteration 50000, Testing net (#0)
I0515 15:47:51.883457 3082 solver.cpp:408] Test net output #0: accuracy = 0
I0515 15:47:51.883920 3082 solver.cpp:408] Test net output #1: loss = 1.18242 (* 1 = 1.18242 loss)
I0515 15:47:51.884052 3082 solver.cpp:325] Optimization Done.
I0515 15:47:51.884162 3082 caffe.cpp:215] Optimization Done.
lenet_solver.prototxt
lenet_train_test.prototxt
Reply all
Reply to author
Forward
0 new messages