mxnet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-mxnet] szha commented on a change in pull request #15038: [C++] fix type inconsistent issue when loading quantized parameters
Date Fri, 24 May 2019 05:55:21 GMT
szha commented on a change in pull request #15038: [C++] fix type inconsistent issue when loading
quantized parameters
URL: https://github.com/apache/incubator-mxnet/pull/15038#discussion_r287223595
 
 

 ##########
 File path: cpp-package/include/mxnet-cpp/ndarray.hpp
 ##########
 @@ -47,17 +47,18 @@ inline NDArray::NDArray(const NDArrayHandle &handle) {
   blob_ptr_ = std::make_shared<NDBlob>(handle);
 }
 inline NDArray::NDArray(const std::vector<mx_uint> &shape, const Context &context,
-                        bool delay_alloc) {
+                        bool delay_alloc, int dtype) {
   NDArrayHandle handle;
-  CHECK_EQ(MXNDArrayCreate(shape.data(), shape.size(), context.GetDeviceType(),
-                           context.GetDeviceId(), delay_alloc, &handle),
+  CHECK_EQ(MXNDArrayCreateEx(shape.data(), shape.size(), context.GetDeviceType(),
+                           context.GetDeviceId(), delay_alloc, dtype, &handle),
 
 Review comment:
   nit: indentation

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


With regards,
Apache Git Services

Mime
View raw message