Contrastive Loss outputs negative loss values

146 views
Skip to first unread message

Tamar Elazari

unread,
Apr 26, 2016, 5:18:53 AM4/26/16
to Caffe Users
Hi all,
 It seems I have a problem with the  Contrastive Loss layer, it outputs negative values in training.

I0426 12:05:25.999092 26389 solver.cpp:222] Iteration 900, loss = -0.015

this is my layer:

layer {
  name: "loss"
  type: "ContrastiveLoss"
  bottom: "feat"
  bottom: "feat_p"
  bottom: "sim_labels"
  top: "loss"
  contrastive_loss_param {
    margin: 1
  }
}

what am I doing wrong?

* the problem is also described here https://github.com/BVLC/caffe/issues/2308
but it doesn't seem to be fixed, since i am getting negative values...

Reply all
Reply to author
Forward
0 new messages