diff options
author | Jeff Donahue <jeff.donahue@gmail.com> | 2014-09-01 12:04:31 -0700 |
---|---|---|
committer | Jeff Donahue <jeff.donahue@gmail.com> | 2014-09-01 12:04:31 -0700 |
commit | b49b2d3e8e0f5ebe453404c79ac9528f426ab2f0 (patch) | |
tree | 458ea406107d4c2e32891fc33dc7e01cfe31432f /examples | |
parent | 5894f039a454c249ba65141b9c20f9edc9b71627 (diff) | |
download | caffeonacl-b49b2d3e8e0f5ebe453404c79ac9528f426ab2f0.tar.gz caffeonacl-b49b2d3e8e0f5ebe453404c79ac9528f426ab2f0.tar.bz2 caffeonacl-b49b2d3e8e0f5ebe453404c79ac9528f426ab2f0.zip |
Add "test-on-train" stage to test accuracy on the training data; correct
test_iter (should be 100 instead of 50)
Diffstat (limited to 'examples')
4 files changed, 39 insertions, 10 deletions
diff --git a/examples/mnist/mnist_autoencoder.prototxt b/examples/mnist/mnist_autoencoder.prototxt index b2bce47b..45d08023 100644 --- a/examples/mnist/mnist_autoencoder.prototxt +++ b/examples/mnist/mnist_autoencoder.prototxt @@ -18,6 +18,23 @@ layers { name: "data" type: DATA data_param { + source: "examples/mnist/mnist_train_lmdb" + backend: LMDB + batch_size: 100 + transform_param { + scale: 0.0039215684 + } + } + include: { + phase: TEST + stage: 'test-on-train' + } +} +layers { + top: "data" + name: "data" + type: DATA + data_param { source: "examples/mnist/mnist_test_lmdb" backend: LMDB batch_size: 100 @@ -25,7 +42,10 @@ layers { scale: 0.0039215684 } } - include: { phase: TEST } + include: { + phase: TEST + stage: 'test-on-test' + } } layers { bottom: "data" diff --git a/examples/mnist/mnist_autoencoder_solver.prototxt b/examples/mnist/mnist_autoencoder_solver.prototxt index af1202fc..be0939d9 100644 --- a/examples/mnist/mnist_autoencoder_solver.prototxt +++ b/examples/mnist/mnist_autoencoder_solver.prototxt @@ -1,6 +1,9 @@ net: "examples/mnist/mnist_autoencoder.prototxt" -test_iter: 50 -test_interval: 100 +test_state: { stage: 'test-on-train' } +test_iter: 500 +test_state: { stage: 'test-on-test' } +test_iter: 100 +test_interval: 500 test_compute_loss: true base_lr: 0.0001 lr_policy: "fixed" diff --git a/examples/mnist/mnist_autoencoder_solver_adagrad.prototxt b/examples/mnist/mnist_autoencoder_solver_adagrad.prototxt index fa7d65cd..641ce8a0 100644 --- a/examples/mnist/mnist_autoencoder_solver_adagrad.prototxt +++ b/examples/mnist/mnist_autoencoder_solver_adagrad.prototxt @@ -1,6 +1,9 @@ -net: "mnist_autoencoder.prototxt" -test_iter: 50 -test_interval: 100 +net: "examples/mnist/mnist_autoencoder.prototxt" +test_state: { stage: 'test-on-train' } +test_iter: 500 +test_state: { stage: 'test-on-test' } +test_iter: 100 +test_interval: 500 test_compute_loss: true base_lr: 0.01 lr_policy: "fixed" diff --git a/examples/mnist/mnist_autoencoder_solver_nesterov.prototxt b/examples/mnist/mnist_autoencoder_solver_nesterov.prototxt index 17487301..254dceec 100644 --- a/examples/mnist/mnist_autoencoder_solver_nesterov.prototxt +++ b/examples/mnist/mnist_autoencoder_solver_nesterov.prototxt @@ -1,6 +1,9 @@ -net: "mnist_autoencoder.prototxt" -test_iter: 50 -test_interval: 100 +net: "examples/mnist/mnist_autoencoder.prototxt" +test_state: { stage: 'test-on-train' } +test_iter: 500 +test_state: { stage: 'test-on-test' } +test_iter: 100 +test_interval: 500 test_compute_loss: true base_lr: 0.0001 lr_policy: "fixed" @@ -8,7 +11,7 @@ display: 20 max_iter: 4000000 weight_decay: 0.0005 snapshot: 10000 -snapshot_prefix: "mnist_autoencoder_train" +snapshot_prefix: "examples/mnist/mnist_autoencoder_nesterov_train" momentum: 0.95 # solver mode: CPU or GPU solver_mode: GPU |