Closed Li-Lai closed 7 years ago
It's the same as Official Caffe. Please refer to proposal_layer.hpp. The default data type is float.
Thanks for your reply. If I use the code for classification task, then i need to get the final layer values (type: Softmax). The following code is right?
`
vector
for (int i = 0; i < layer_values->count(); i++)
{
float &get_value = get_values[i];
get_value = layer_values->data_at(0, i, 0, 0);####?
cout << "get_value:" << get_value << endl;
}
`
Assume you have the net definition like below
layer {
name: "prob-layer"
type: "Softmax"
bottom: "score"
top: "prob"
}
Then you should get the output from Blob prob
.
shared_ptr<Blob> prob = net->blob_by_name("prob");
for (int i = 0; i < prob->count(); i++) {
...
}
Thanks. I'll take a good look at your examples.
Thank you for sharing the code. Could you tell me how to add a new layer in min-caffe? Is it the same as caffe?