lobanov-m commented on a change in pull request #13226: [MXNet-1211] Factor and 
"Like" modes in BilinearResize2D operator
URL: https://github.com/apache/incubator-mxnet/pull/13226#discussion_r236162450
 
 

 ##########
 File path: src/operator/contrib/bilinear_resize-inl.h
 ##########
 @@ -44,17 +44,39 @@
 #include "../mxnet_op.h"
 #include "../mshadow_op.h"
 
+namespace bilinear_resize {
+enum BilinearResizeOpMode{size, scale, odd_scale, like, to_even};
+}  // namespace bilinear_resize
+
+
 namespace mxnet {
 namespace op {
 
 struct BilinearSampleParam : public dmlc::Parameter<BilinearSampleParam> {
-  int height;
-  int width;
+  float height;
+  float width;
+  int mode;
   DMLC_DECLARE_PARAMETER(BilinearSampleParam) {
-    DMLC_DECLARE_FIELD(height).set_range(1, 10000)
-    .describe("output height (required)");
-    DMLC_DECLARE_FIELD(width).set_range(1, 10000)
-    .describe("output width (required)");
+    DMLC_DECLARE_FIELD(height).set_range(0, 10000)
+    .set_default(-1)
 
 Review comment:
   It is not required parameter, when using mode 'like'. In this mode we can 
pass two tensors and the first tensor would be resized to second tensor's size. 
But for other modes it is still required, so default value is inappropriate and 
should raise error.

----------------------------------------------------------------
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

Reply via email to