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

Function LoadOperatorsMap

tensorflow/lite/toco/tflite/export.cc:191–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189}
190
191void LoadOperatorsMap(
192 const Model& model, OperatorsMap* operators_map,
193 const std::map<OperatorType, std::unique_ptr<BaseOperator>>& ops_by_type,
194 bool enable_select_tf_ops) {
195 // First find a list of unique operator types.
196 std::set<OperatorKey> keys;
197 for (const auto& op : model.operators) {
198 const toco::OperatorSignature op_signature = {op.get(), &model};
199 keys.insert(OperatorKey(op_signature, ops_by_type, enable_select_tf_ops));
200 }
201 // Now assign indices to them and fill in the map.
202 int index = 0;
203 for (const auto& key : keys) {
204 (*operators_map)[key] = index;
205 ++index;
206 }
207}
208
209} // namespace details
210

Callers 2

ExportFunction · 0.85
TEST_FFunction · 0.85

Calls 3

OperatorKeyClass · 0.85
getMethod · 0.45
insertMethod · 0.45

Tested by 1

TEST_FFunction · 0.68