MCPcopy Create free account
hub / github.com/OAID/Tengine / DumpShape

Method DumpShape

core/lib/tensor_shape.cpp:37–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37void TShape::DumpShape(std::ostream& os) const
38{
39 std::string result = "[";
40
41 if(dim_.size() > 0)
42 {
43 unsigned i;
44
45 for(i = 0; i < dim_.size() - 1; i++)
46 {
47 result += std::to_string(dim_[i]) + ",";
48 }
49
50 if(i == (dim_.size() - 1))
51 {
52 result += std::to_string(dim_[i]);
53 }
54 }
55
56 result += "]";
57 os << result;
58}
59
60int TShape::GetN(void) const
61{

Callers 1

DumpTensorMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected