MCPcopy Create free account
hub / github.com/Samsung/ONE / read_layer_params

Function read_layer_params

compiler/circle-quantizer/src/CircleQuantizer.cpp:67–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65};
66
67LayerParams read_layer_params(std::string &filename)
68{
69 QConfReader qcr;
70 qcr.init(filename);
71
72 auto layers = qcr.root()["layers"];
73 LayerParams p;
74 for (auto layer : layers)
75 {
76 if (layer.isMember("name"))
77 {
78 auto l = std::make_shared<LayerParam>();
79 {
80 l->name = layer["name"].asString();
81 l->dtype = layer["dtype"].asString();
82 l->granularity = layer["granularity"].asString();
83 }
84 p.emplace_back(l);
85 }
86
87 // Multiple names with the same dtype & granularity
88 if (layer.isMember("names"))
89 {
90 for (auto name : layer["names"])
91 {
92 auto l = std::make_shared<LayerParam>();
93 {
94 l->name = name.asString();
95 l->dtype = layer["dtype"].asString();
96 l->granularity = layer["granularity"].asString();
97 }
98 p.emplace_back(l);
99 }
100 }
101 }
102
103 return p;
104}
105
106LayerParamsSet read_layer_params_set(std::string &filename)
107{

Callers 2

read_layer_params_setFunction · 0.85
entryFunction · 0.85

Calls 5

rootMethod · 0.80
isMemberMethod · 0.80
initMethod · 0.45
asStringMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected