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

Method SetCustomOp

tensorflow/lite/kernels/test_util.cc:104–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104void SingleOpModel::SetCustomOp(
105 const string& name, const std::vector<uint8_t>& custom_option,
106 const std::function<TfLiteRegistration*()>& registration) {
107 custom_registrations_[name] = registration;
108 opcodes_.push_back(
109 CreateOperatorCodeDirect(builder_, BuiltinOperator_CUSTOM, name.data()));
110 operators_.push_back(CreateOperator(
111 builder_, /*opcode_index=*/0, builder_.CreateVector<int32_t>(inputs_),
112 builder_.CreateVector<int32_t>(outputs_), BuiltinOptions_NONE, 0,
113 builder_.CreateVector<uint8_t>(custom_option),
114 CustomOptionsFormat_FLEXBUFFERS));
115}
116
117void SingleOpModel::BuildInterpreter(std::vector<std::vector<int>> input_shapes,
118 int num_threads,

Callers

nothing calls this directly

Calls 4

CreateOperatorCodeDirectFunction · 0.85
CreateOperatorFunction · 0.85
push_backMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected