Hello,
I want to create a PyCaffe loss layer with two tops. The reason is that I want to output from the loss layer the loss and another value to monitor it.
If I just add two tops as:
PyCaffe layer:
top[0].data[...] = loss
top[1].data[...] = value_to_monitor
prototxt:
layer {
name: "lossCustom"
type: "Python"
bottom: "fc2"
bottom: "label"
top: "loss"
top: "value_to_monitor"
python_param {
module: "my_loss_layer"
layer: "myLossLayer"
}
loss_weight: 1
}
I get this error:
Check failed: top.size() == num_loss_weights (2 vs. 1) loss_weight must be unspecified or specified once per top blob.
But I don't need to weight two losses (btw, how weight values should be written in the prototxt to do that?), I just need to output another value.
How can I do that?
Thanks