MCPcopy Create free account
hub / github.com/BVLC/caffe / AccuracyLayerTest

Method AccuracyLayerTest

src/caffe/test/test_accuracy_layer.cpp:19–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17class AccuracyLayerTest : public CPUDeviceTest<Dtype> {
18 protected:
19 AccuracyLayerTest()
20 : blob_bottom_data_(new Blob<Dtype>()),
21 blob_bottom_label_(new Blob<Dtype>()),
22 blob_top_(new Blob<Dtype>()),
23 blob_top_per_class_(new Blob<Dtype>()),
24 top_k_(3) {
25 vector<int> shape(2);
26 shape[0] = 100;
27 shape[1] = 10;
28 blob_bottom_data_->Reshape(shape);
29 shape.resize(1);
30 blob_bottom_label_->Reshape(shape);
31 FillBottoms();
32
33 blob_bottom_vec_.push_back(blob_bottom_data_);
34 blob_bottom_vec_.push_back(blob_bottom_label_);
35 blob_top_vec_.push_back(blob_top_);
36 blob_top_per_class_vec_.push_back(blob_top_);
37 blob_top_per_class_vec_.push_back(blob_top_per_class_);
38 }
39
40 virtual void FillBottoms() {
41 // fill the probability values

Callers

nothing calls this directly

Calls 1

ReshapeMethod · 0.45

Tested by

no test coverage detected