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

Function TEST

test/singa/test_dropout.cc:27–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25using singa::Dropout;
26using singa::Shape;
27TEST(Dropout, Setup) {
28 Dropout drop;
29 // EXPECT_EQ("Dropout", drop.layer_type());
30
31 singa::LayerConf conf;
32 singa::DropoutConf* dropconf = conf.mutable_dropout_conf();
33 dropconf->set_dropout_ratio(0.8f);
34
35 drop.Setup(Shape{3}, conf);
36 EXPECT_EQ(0.8f, drop.dropout_ratio());
37}
38
39TEST(Dropout, Forward) {
40 const float x[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f};

Callers

nothing calls this directly

Calls 6

dropout_ratioMethod · 0.80
SetupMethod · 0.45
CopyDataFromHostPtrMethod · 0.45
ForwardMethod · 0.45
SizeMethod · 0.45
BackwardMethod · 0.45

Tested by

no test coverage detected