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

Function initialize

serving/processor/serving/processor.cc:9–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7
8extern "C" {
9void* initialize(const char* model_entry, const char* model_config,
10 int* state) {
11 auto model = new tensorflow::processor::Model(std::string(model_entry));
12 auto status = model->Init(model_config);
13 if (!status.ok()) {
14 std::cerr << "[TensorFlow] Processor initialize failed"
15 << ", status:" << status.error_message() << std::endl;
16 *state = -1;
17 return nullptr;
18 }
19
20 std::cout << "[TensorFlow] Processor initialize success." << std::endl;
21
22 *state = 0;
23 return model;
24}
25
26int process(void* model_buf, const void* input_data, int input_size,
27 void** output_data, int* output_size) {

Callers 1

mainFunction · 0.50

Calls 2

InitMethod · 0.45
okMethod · 0.45

Tested by 1

mainFunction · 0.40