MCPcopy Create free account
hub / github.com/apache/singa / TEST

Function TEST

test/singa/test_prelu.cc:28–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26using singa::PReLU;
27using singa::Shape;
28TEST(PReLU, Setup) {
29 PReLU prelu;
30 // EXPECT_EQ("PReLU", prelu.layer_type());
31
32 singa::LayerConf conf;
33 singa::PReLUConf *preluconf = conf.mutable_prelu_conf();
34 preluconf->set_channel_shared(true);
35 preluconf->set_format("NHWC");
36
37 prelu.Setup(Shape{4}, conf);
38 EXPECT_EQ(true, prelu.Channel_shared());
39 EXPECT_EQ("NHWC", prelu.Format());
40}
41
42TEST(PReLU, ForwardCPU) {
43 const float x[] = {1.f, 2.f, 3.f, -2.f, -3.f, -1.f,

Callers

nothing calls this directly

Calls 10

maxFunction · 0.85
minFunction · 0.85
Channel_sharedMethod · 0.80
Set_aMethod · 0.80
ToHostMethod · 0.80
SetupMethod · 0.45
FormatMethod · 0.45
ForwardMethod · 0.45
SizeMethod · 0.45
BackwardMethod · 0.45

Tested by

no test coverage detected