MCPcopy Create free account
hub / github.com/ARM-software/armnn / ConvertTensorShapeToString

Function ConvertTensorShapeToString

src/armnnUtils/PrototxtConversions.cpp:32–43  ·  view source on GitHub ↗

Converts an TensorShape into Prototxt representation

Source from the content-addressed store, hash-verified

30
31/// Converts an TensorShape into Prototxt representation
32std::string ConvertTensorShapeToString(const armnn::TensorShape& shape)
33{
34 std::stringstream ss;
35 for (unsigned int i = 0 ; i < shape.GetNumDimensions() ; i++)
36 {
37 ss << "dim {\n";
38 ss << "size: " << std::to_string(shape[i]) << "\n";
39 ss << "}\n";
40 }
41 return ss.str();
42
43}
44} // namespace armnnUtils

Callers 1

Calls 3

to_stringFunction · 0.50
GetNumDimensionsMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected