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

Method ScaleLayerTest

src/caffe/test/test_scale_layer.cpp:21–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19
20 protected:
21 ScaleLayerTest()
22 : blob_bottom_(new Blob<Dtype>(2, 3, 4, 5)),
23 blob_bottom_eltwise_(new Blob<Dtype>(2, 3, 4, 5)),
24 blob_bottom_broadcast_0_(new Blob<Dtype>()),
25 blob_bottom_broadcast_1_(new Blob<Dtype>()),
26 blob_bottom_broadcast_2_(new Blob<Dtype>()),
27 blob_bottom_scale_(new Blob<Dtype>(vector<int>())),
28 blob_top_(new Blob<Dtype>()) {
29 Caffe::set_random_seed(1701);
30 vector<int> broadcast_shape(2);
31 broadcast_shape[0] = 2; broadcast_shape[1] = 3;
32 this->blob_bottom_broadcast_0_->Reshape(broadcast_shape);
33 broadcast_shape[0] = 3; broadcast_shape[1] = 4;
34 this->blob_bottom_broadcast_1_->Reshape(broadcast_shape);
35 broadcast_shape[0] = 4; broadcast_shape[1] = 5;
36 this->blob_bottom_broadcast_2_->Reshape(broadcast_shape);
37 FillerParameter filler_param;
38 filler_param.set_min(1);
39 filler_param.set_max(10);
40 UniformFiller<Dtype> filler(filler_param);
41 filler.Fill(this->blob_bottom_);
42 filler.Fill(this->blob_bottom_eltwise_);
43 filler.Fill(this->blob_bottom_broadcast_0_);
44 filler.Fill(this->blob_bottom_broadcast_1_);
45 filler.Fill(this->blob_bottom_broadcast_2_);
46 filler.Fill(this->blob_bottom_scale_);
47 blob_bottom_vec_.push_back(blob_bottom_);
48 blob_top_vec_.push_back(blob_top_);
49 }
50 virtual ~ScaleLayerTest() {
51 delete blob_bottom_;
52 delete blob_bottom_eltwise_;

Callers

nothing calls this directly

Calls 3

set_random_seedFunction · 0.85
ReshapeMethod · 0.45
FillMethod · 0.45

Tested by

no test coverage detected