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

Function TEST

test/singa/test_slice.cc:26–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24
25using singa::Shape;
26TEST(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
40void ForwardSliceRowTest(std::shared_ptr<singa::Device> dev) {
41 size_t a = 2u, b = 1u, c = 3u;

Callers

nothing calls this directly

Calls 6

ForwardSliceRowTestFunction · 0.85
ForwardSliceColumnTestFunction · 0.85
BackwardSliceRowTestFunction · 0.85
BackwardSliceColumnTestFunction · 0.85
SetupMethod · 0.45
GetOutputSampleShapeMethod · 0.45

Tested by

no test coverage detected