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

Function IsDiscardableArray

tensorflow/lite/toco/tooling_util.cc:2219–2234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2217}
2218
2219bool IsDiscardableArray(const Model& model, const string& array_name) {
2220 if (IsInputArray(model, array_name) || IsOutputArray(model, array_name)) {
2221 return false;
2222 }
2223 for (const auto& rnn_state : model.flags.rnn_states()) {
2224 if (!rnn_state.discardable()) {
2225 if (array_name == rnn_state.state_array()) {
2226 return false;
2227 }
2228 if (array_name == rnn_state.back_edge_source_array()) {
2229 return false;
2230 }
2231 }
2232 }
2233 return true;
2234}
2235
2236bool ReshapeIsEquivalentToTranspose(const Model& model,
2237 const TensorFlowReshapeOperator* op,

Callers 15

DeleteArrayIfUnusedFunction · 0.85
CheckNoOrphanedArrayFunction · 0.85
FixNoOrphanedArrayFunction · 0.85
DedupeConstantArraysFunction · 0.85
RunMethod · 0.85
RunMethod · 0.85
IsReshapeTrivialFunction · 0.85
RunMethod · 0.85
RunMethod · 0.85
RunMethod · 0.85
RunMethod · 0.85

Calls 2

IsInputArrayFunction · 0.85
IsOutputArrayFunction · 0.85

Tested by

no test coverage detected