You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/11/20 10:41:39 UTC

[GitHub] yajiedesign opened a new issue #13335: MXPredCreate lost dtype

yajiedesign opened a new issue #13335: MXPredCreate lost dtype
URL: https://github.com/apache/incubator-mxnet/issues/13335
 
 
   ## Description
   when use MXPredCreate with int8.it will  Type inconsistent error.
    I find https://github.com/apache/incubator-mxnet/blob/master/src/c_api/c_predict_api.cc#L213 cause data dtype to lose.And then cause Type inconsistent.
   
   
   ## Environment info (Required)
   ----------Python Info----------
   Version      : 3.6.0
   Compiler     : MSC v.1900 64 bit (AMD64)
   Build        : ('default', 'Dec 23 2016 11:57:41')
   Arch         : ('64bit', 'WindowsPE')
   ------------Pip Info-----------
   Version      : 18.1
   Directory    : D:\Anaconda3\lib\site-packages\pip
   ----------MXNet Info-----------
   Version      : 1.3.1
   Directory    : G:\deeplearn\mxnet\python\mxnet
   Hashtag not found. Not installed from pre-built package.
   ----------System Info----------
   Platform     : Windows-10-10.0.17134-SP0
   system       : Windows
   node         : DEVEGA
   release      : 10
   version      : 10.0.17134
   
   Package used (Python/R/Scala/Julia):C api
   
   ## Build info (Required if built from source)
   
   Compiler (gcc/clang/mingw/visual studio):visual studio
   
   MXNet commit hash:
   017941e6ca177a15ec65d8bd35f7ccd20ef2b30d
   
   Build config:
   
   
   ## Error Message:
   Type inconsistent, Provided = float32, inferred type = int8
   
   ## Minimum reproducible example
   `  std::string json_file = "int8-symbol.json";
     std::string param_file = "int8-0000.params";
     BufferFile json_data(json_file);
     BufferFile param_data(param_file);
   
     mx_uint num_input_nodes = 1;
     const char* input_key[1] = { "data" };
     const char** input_keys = input_key;
   
   
     const mx_uint input_shape_indptr[2] = { 0,4 };
     const mx_uint input_shape_data[4] = { 1,static_cast<mx_uint>(3) ,static_cast<mx_uint>(1080),static_cast<mx_uint>(1920) };
   
     PredictorHandle pred_hnd = 0;
   
     int dev_type = 1;
     int dev_id = 1;
   
     MXPredCreate(
       static_cast<const char*>(json_data.GetBuffer()),
       static_cast<const char*>(param_data.GetBuffer()),
       static_cast<int>(param_data.GetLength()),
       dev_type,
       dev_id,
       num_input_nodes,
       input_keys,
       input_shape_indptr,
       input_shape_data,
       &pred_hnd);
   `
   
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services