mnist_autoencoder: always compute both cross-entropy loss and L2
authorJeff Donahue <jeff.donahue@gmail.com>
Mon, 1 Sep 2014 18:39:39 +0000 (11:39 -0700)
committerJeff Donahue <jeff.donahue@gmail.com>
Mon, 1 Sep 2014 18:40:14 +0000 (11:40 -0700)
(euclidean) error

examples/mnist/mnist_autoencoder.prototxt

index b6009fb..b2bce47 100644 (file)
@@ -248,22 +248,22 @@ layers {
 layers {
   bottom: "decode1"
   bottom: "flatdata"
+  top: "cross_entropy_loss"
   name: "loss"
   type: SIGMOID_CROSS_ENTROPY_LOSS
-  include: { phase: TRAIN }
+  loss_weight: 1
 }
 layers {
   bottom: "decode1"
   top: "decode1neuron"
   name: "decode1neuron"
   type: SIGMOID
-  include: { phase: TEST }
 }
 layers {
   bottom: "decode1neuron"
   bottom: "flatdata"
+  top: "l2_error"
   name: "loss"
   type: EUCLIDEAN_LOSS
-  top: "loss"
-  include: { phase: TEST }
+  loss_weight: 0
 }