| 24 | |
| 25 | using singa::Shape; |
| 26 | TEST(Slice, Setup) { |
| 27 | singa::LayerConf conf; |
| 28 | conf.set_type("singa_slice"); |
| 29 | auto slice_conf = conf.mutable_slice_conf(); |
| 30 | slice_conf->set_axis(1); |
| 31 | slice_conf->add_slice_point(2); |
| 32 | singa::Slice layer; |
| 33 | layer.Setup({3u}, conf); |
| 34 | auto s1 = layer.GetOutputSampleShape(0); |
| 35 | EXPECT_EQ(s1[0], 2u); |
| 36 | auto s2 = layer.GetOutputSampleShape(1); |
| 37 | EXPECT_EQ(s2[0], 1u); |
| 38 | } |
| 39 | |
| 40 | void ForwardSliceRowTest(std::shared_ptr<singa::Device> dev) { |
| 41 | size_t a = 2u, b = 1u, c = 3u; |
nothing calls this directly
no test coverage detected