I'm using the Caffenet model. I did a classification task with 9 classes successfully. Then I tried to change it to a regression network by preparing another LMDB file with labels ranging from 700 to 1400. I changed the original training code and replaced the softmax with EuclideanLoss and num_outputs to 1. I did the same for testing and got this error:
"Check failed: ExactNumBottomBlobs() == bottom.size() (2 vs. 1) EuclideanLoss Layer takes 2 bottom blob(s) as input. * Check failure stack trace: * Aborted (core dumped)" So I commented out EuclideanLoss layer:
layer { name: "prob" type: "EuclideanLoss" bottom: "fc8-cats-dogs-n" top: "prob" }
but now I get:
File "testr.py", line 86, in pred_probas = out['prob'] KeyError: 'prob'
Can anyone help me with this please?