stu1130 commented on a change in pull request #13614: Make to_tensor and
normalize to accept 3D or 4D tensor inputs
URL: https://github.com/apache/incubator-mxnet/pull/13614#discussion_r240793402
##########
File path: src/operator/image/image_random-inl.h
##########
@@ -62,6 +67,23 @@ inline bool ToTensorType(const nnvm::NodeAttrs& attrs,
return (*in_attrs)[0] != -1;
}
+void ToTensorImpl(const std::vector<TBlob> &inputs,
+ const std::vector<TBlob> &outputs,
+ const int length,
+ const int channel,
+ const int step = 0) {
+ MSHADOW_TYPE_SWITCH(inputs[0].type_flag_, DType, {
+ float* output = outputs[0].dptr<float>();
+ DType* input = inputs[0].dptr<DType>();
+
Review comment:
```suggestion
#pragma omp parallel for collapse(2)
```
would this make better performance?
----------------------------------------------------------------
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