| 25 | using singa::Dropout; |
| 26 | using singa::Shape; |
| 27 | TEST(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 | |
| 39 | TEST(Dropout, Forward) { |
| 40 | const float x[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f}; |
nothing calls this directly
no test coverage detected