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

Function TEST

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

Source from the content-addressed store, hash-verified

25using singa::Flatten;
26using singa::Shape;
27TEST(Flatten, Setup) {
28 Flatten flt;
29 // EXPECT_EQ("Flatten", flt.layer_type());
30
31 singa::LayerConf conf;
32 singa::FlattenConf *flattenconf = conf.mutable_flatten_conf();
33 flattenconf->set_axis(1);
34
35 flt.Setup(Shape{2}, conf);
36 EXPECT_EQ(1, flt.Axis());
37}
38
39TEST(Flatten, ForwardCPU) {
40 const float x[] = {1.f, 2.f, 3.f, -2.f, -3.f, -4.f,

Callers

nothing calls this directly

Calls 7

AxisMethod · 0.80
shapeMethod · 0.80
ToHostMethod · 0.80
SetupMethod · 0.45
ForwardMethod · 0.45
SizeMethod · 0.45
BackwardMethod · 0.45

Tested by

no test coverage detected