ray3572 opened a new issue #8038: why I use MXPredCreate(), it shows  " 
mxnet_predict-all.cc:23570: Check failed: op != nullptr Operator 
RegressionOutput is not registered"?
URL: https://github.com/apache/incubator-mxnet/issues/8038
 
 
   For bugs or installation issues, please provide the following information.
   The more information you provide, the more likely people will be able to 
help you.
   
   ## Environment info
   Operating System:Ubuntu 16.04
   
   Compiler: g++ 5.4.0
   
   Package used (Python/R/Scala/Julia):C++
   
   MXNet version: 0.11.0
   
   ## Error Message:
   
   model/pnet-symbol.json ... 5435 bytes
   model/pnet-0070.params ... 27406 bytes
   [15:15:13] mxnet_predict-all.cc:684: [15:15:13] mxnet_predict-all.cc:23570: 
Check failed: op != nullptr Operator RegressionOutput is not registered
   mtcnn: /home/ray/mtcnn-cpp/ubuntu16.04/src/main.cpp:194: int main(int, 
char**): Assertion `pred_hnd' failed.
   Aborted (core dumped)
   
   ## Minimum reproducible example
   /***************************************************************************/
   std::string json_file = "model/pnet-symbol.json";
       std::string param_file = "model/pnet-0070.params";
   
       BufferFile json_data(json_file);
       BufferFile param_data(param_file);
   
       // Parameters
       int dev_type = 1;  // 1: cpu, 2: gpu
       int dev_id = 0;  // arbitrary.
       mx_uint num_input_nodes = 1;  // 1 for feedforward
       const char* input_key[1] = {"data"};
       const char** input_keys = input_key;
   
       // Image size and channels
       int width = 224;
       int height = 224;
       int channels = 3;
   
       const mx_uint input_shape_indptr[2] = { 0, 4 };
       const mx_uint input_shape_data[4] = { 1,
                                           static_cast<mx_uint>(channels),
                                           static_cast<mx_uint>(height),
                                           static_cast<mx_uint>(width)};
       PredictorHandle pred_hnd = 0;
   
       if (json_data.GetLength() == 0 ||
           param_data.GetLength() == 0) {
           return -1;
       }
   
       // Create Predictor
       MXPredCreate((const char*)json_data.GetBuffer(),
                    (const char*)param_data.GetBuffer(),
                    static_cast<size_t>(param_data.GetLength()),
                    dev_type,
                    dev_id,
                    num_input_nodes,
                    input_keys,
                    input_shape_indptr,
                    input_shape_data,
                    &pred_hnd);
       assert(pred_hnd);
   
/*******************************************************************************/
   ## Json file :
   {
     "nodes": [
       {
         "op": "null", 
         "name": "data", 
         "inputs": []
       }, 
       {
         "op": "null", 
         "name": "conv1_weight", 
         "attr": {
           "kernel": "(5, 3)", 
           "num_filter": "10", 
           "stride": "(1, 1)"
         }, 
         "inputs": []
       }, 
       {
         "op": "null", 
         "name": "conv1_bias", 
         "attr": {
           "kernel": "(5, 3)", 
           "num_filter": "10", 
           "stride": "(1, 1)"
         }, 
         "inputs": []
       }, 
       {
         "op": "Convolution", 
         "name": "conv1", 
         "attr": {
           "kernel": "(5, 3)", 
           "num_filter": "10", 
           "stride": "(1, 1)"
         }, 
         "inputs": [[0, 0, 0], [1, 0, 0], [2, 0, 0]]
       }, 
       {
         "op": "null", 
         "name": "prelu1_gamma", 
         "attr": {
           "__init__": "[\"Constant\", {\"value\": 0.25}]", 
           "act_type": "prelu"
         }, 
         "inputs": []
       }, 
       {
         "op": "LeakyReLU", 
         "name": "prelu1", 
         "attr": {"act_type": "prelu"}, 
         "inputs": [[3, 0, 0], [4, 0, 0]]
       }, 
       {
         "op": "Pooling", 
         "name": "pool1", 
         "attr": {
           "kernel": "(4, 2)", 
           "pool_type": "max", 
           "pooling_convention": "full", 
           "stride": "(4, 2)"
         }, 
         "inputs": [[5, 0, 0]]
       }, 
       {
         "op": "null", 
         "name": "conv2_weight", 
         "attr": {
           "kernel": "(2, 2)", 
           "num_filter": "16"
         }, 
         "inputs": []
       }, 
       {
         "op": "null", 
         "name": "conv2_bias", 
         "attr": {
           "kernel": "(2, 2)", 
           "num_filter": "16"
         }, 
         "inputs": []
       }, 
       {
         "op": "Convolution", 
         "name": "conv2", 
         "attr": {
           "kernel": "(2, 2)", 
           "num_filter": "16"
         }, 
         "inputs": [[6, 0, 0], [7, 0, 0], [8, 0, 0]]
       }, 
       {
         "op": "null", 
         "name": "prelu2_gamma", 
         "attr": {
           "__init__": "[\"Constant\", {\"value\": 0.25}]", 
           "act_type": "prelu"
         }, 
         "inputs": []
       }, 
       {
         "op": "LeakyReLU", 
         "name": "prelu2", 
         "attr": {"act_type": "prelu"}, 
         "inputs": [[9, 0, 0], [10, 0, 0]]
       }, 
       {
         "op": "null", 
         "name": "conv3_weight", 
         "attr": {
           "kernel": "(2, 2)", 
           "num_filter": "32"
         }, 
         "inputs": []
       }, 
       {
         "op": "null", 
         "name": "conv3_bias", 
         "attr": {
           "kernel": "(2, 2)", 
           "num_filter": "32"
         }, 
         "inputs": []
       }, 
       {
         "op": "Convolution", 
         "name": "conv3", 
         "attr": {
           "kernel": "(2, 2)", 
           "num_filter": "32"
         }, 
         "inputs": [[11, 0, 0], [12, 0, 0], [13, 0, 0]]
       }, 
       {
         "op": "null", 
         "name": "prelu3_gamma", 
         "attr": {
           "__init__": "[\"Constant\", {\"value\": 0.25}]", 
           "act_type": "prelu"
         }, 
         "inputs": []
       }, 
       {
         "op": "LeakyReLU", 
         "name": "prelu3", 
         "attr": {"act_type": "prelu"}, 
         "inputs": [[14, 0, 0], [15, 0, 0]]
       }, 
       {
         "op": "null", 
         "name": "conv4_1_weight", 
         "attr": {
           "kernel": "(1, 1)", 
           "num_filter": "2"
         }, 
         "inputs": []
       }, 
       {
         "op": "null", 
         "name": "conv4_1_bias", 
         "attr": {
           "kernel": "(1, 1)", 
           "num_filter": "2"
         }, 
         "inputs": []
       }, 
       {
         "op": "Convolution", 
         "name": "conv4_1", 
         "attr": {
           "kernel": "(1, 1)", 
           "num_filter": "2"
         }, 
         "inputs": [[16, 0, 0], [17, 0, 0], [18, 0, 0]]
       }, 
       {
         "op": "null", 
         "name": "label", 
         "inputs": []
       }, 
       {
         "op": "SoftmaxOutput", 
         "name": "cls_prob", 
         "attr": {
           "multi_output": "True", 
           "out_grad": "True", 
           "use_ignore": "True"
         }, 
         "inputs": [[19, 0, 0], [20, 0, 0]]
       }, 
       {
         "op": "null", 
         "name": "conv4_2_weight", 
         "attr": {
           "kernel": "(1, 1)", 
           "num_filter": "4"
         }, 
         "inputs": []
       }, 
       {
         "op": "null", 
         "name": "conv4_2_bias", 
         "attr": {
           "kernel": "(1, 1)", 
           "num_filter": "4"
         }, 
         "inputs": []
       }, 
       {
         "op": "Convolution", 
         "name": "conv4_2", 
         "attr": {
           "kernel": "(1, 1)", 
           "num_filter": "4"
         }, 
         "inputs": [[16, 0, 0], [22, 0, 0], [23, 0, 0]]
       }, 
       {
         "op": "Reshape", 
         "name": "conv4_2_reshape", 
         "attr": {"shape": "(-1, 4)"}, 
         "inputs": [[24, 0, 0]]
       }, 
       {
         "op": "null", 
         "name": "bbox_target", 
         "inputs": []
       }, 
       {
         "op": "LinearRegressionOutput", 
         "name": "bbox_pred", 
         "attr": {"grad_scale": "1"}, 
         "inputs": [[25, 0, 0], [26, 0, 0]]
       }
     ], 
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to