MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TEST

Function TEST

tensorflow/core/graph/tensor_id_test.cc:28–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26string ParseHelper(const string& n) { return ParseTensorName(n).ToString(); }
27
28TEST(TensorIdTest, ParseTensorName) {
29 EXPECT_EQ(ParseHelper("W1"), "W1:0");
30 EXPECT_EQ(ParseHelper("weights:0"), "weights:0");
31 EXPECT_EQ(ParseHelper("W1:1"), "W1:1");
32 EXPECT_EQ(ParseHelper("W1:17"), "W1:17");
33 EXPECT_EQ(ParseHelper("xyz1_17"), "xyz1_17:0");
34 EXPECT_EQ(ParseHelper("^foo"), "^foo");
35}
36
37uint32 Skewed(random::SimplePhilox* rnd, int max_log) {
38 const uint32 space = 1 << (rnd->Rand32() % (max_log + 1));

Callers

nothing calls this directly

Calls 3

ParseHelperFunction · 0.85
ParseTensorNameFunction · 0.85
IsTensorIdControlFunction · 0.85

Tested by

no test coverage detected