zhreshold commented on a change in pull request #14083: Do not use operation
request type for ToTensor operator
URL: https://github.com/apache/incubator-mxnet/pull/14083#discussion_r254878856
##########
File path: src/operator/image/image_random-inl.h
##########
@@ -79,16 +79,15 @@ inline bool ToTensorType(const nnvm::NodeAttrs& attrs,
// Operator Implementation
-template<int req>
struct totensor_forward {
template<typename DType>
MSHADOW_XINLINE static void Map(uint32_t c, float* out_data, const DType*
in_data,
const int length, const int channel, const
int step,
const float normalize_factor = 255.0f) {
#pragma omp parallel for
for (int i = 0; i < length; ++i) {
- KERNEL_ASSIGN(out_data[step + c*length + i], req,
- (in_data[step + i*channel + c]) / normalize_factor);
+ out_data[step + c*length + i] =
Review comment:
you should take care of the req rather than disable the check, this is
dangerous for any behavior our of your usecase right now
----------------------------------------------------------------
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