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

Function GetArrayCompassPt

tensorflow/lite/toco/dump_graphviz.cc:170–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170string GetArrayCompassPt(const Model& model, const string& array_name) {
171 // The "compass point" is the point on the node where edge connections are
172 // made. For most arrays we don't care, but input's and outputs look better
173 // connected at the tip of the "house" and "invhouse" shapes used. So we
174 // append ":n" and ":s" respectively for those.
175 for (const auto& rnn_state : model.flags.rnn_states()) {
176 // RNN state is essentially an input
177 if (array_name == rnn_state.state_array()) {
178 return ":s";
179 }
180 // RNN back-edge source is essentially an output
181 if (array_name == rnn_state.back_edge_source_array()) {
182 return ":n";
183 }
184 }
185 if (IsInputArray(model, array_name)) {
186 return ":s";
187 }
188 if (IsOutputArray(model, array_name)) {
189 return ":n";
190 }
191 return "";
192}
193
194void AppendArrayVal(string* string, Array const& array, int index) {
195 if (array.buffer->type == ArrayDataType::kFloat) {

Callers 1

DumpOperatorEdgesFunction · 0.85

Calls 2

IsInputArrayFunction · 0.85
IsOutputArrayFunction · 0.85

Tested by

no test coverage detected