sandeep-krishnamurthy commented on a change in pull request #15245: FP16
Support for C Predict API
URL: https://github.com/apache/incubator-mxnet/pull/15245#discussion_r300178476
##########
File path: amalgamation/python/mxnet_predict.py
##########
@@ -133,15 +199,38 @@ def __init__(self, symbol_file,
handle = PredictorHandle()
param_raw_bytes = bytearray(param_raw_bytes)
ptr = (ctypes.c_char *
len(param_raw_bytes)).from_buffer(param_raw_bytes)
- _check_call(_LIB.MXPredCreate(
+
+ # data types
+ num_provided_arg_types = 0
+ # provided type argument names
+ provided_arg_type_names = ctypes.POINTER(ctypes.c_char_p)()
+ # provided types
+ provided_arg_type_data = ctypes.POINTER(mx_uint)()
+ if type_dict is not None:
+ provided_arg_type_names = []
+ provided_arg_type_data = []
+ for k, v in type_dict.items():
+ v = np.dtype(v).type
+ if v in _DTYPE_NP_TO_MX:
+ provided_arg_type_names.append(k)
Review comment:
This is one related - https://github.com/apache/incubator-mxnet/issues/7681
It was mostly in data/label shapes and names in Module.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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