). This example has both training and validation data. I'd like to get a sense of the accuracy of the trained model on the validation data set. However, only the loss is reported.
Is it possible to add an AccuracyLayer to the Siamese network to also get a sense of how the trained model is doing using the validation data?
I tried the following:
layer {
name: "accuracy"
type: "Accuracy"
bottom: "feat"
bottom: "feat_p"
bottom: "sim"
top: "accuracy"
include {
phase: TEST
}
}
However this doesn't work as only two bottom entries are allowed, not three ("feat" and "feat_p" roll up from the two halves of the trained network, while "sim" is the correct, expected target value).
Does the Siamese network have a predicted output of 0 or 1 that indicates similarity? I know there is the constrastive loss function that takes both halves of the Siamese network and attempts to determine how accurate the prediction is to the target:
layer {
name: "loss"
type: "ContrastiveLoss"
bottom: "feat"
bottom: "feat_p"
bottom: "sim"
top: "loss"
contrastive_loss_param {
margin: 1
}
}
If I can roll this up to a single predicted 0 or 1 value I could then get an accuracy store vs. the target (I believe).
Any pointers on the right way to get accuracy values for these kinds of networks in Caffe? I'd like to get accuracy values every X number of steps on the validation data so I can graph it.
Best,
Brad Neuberg