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

 ##########
 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)
+    .describe(R"(output height if mode is "size" or scale on which input 
height should be multiplied if mode is
+                 "scale" or "odd_scale")");
+    DMLC_DECLARE_FIELD(width).set_range(0, 10000)
+    .set_default(-1)
 
 Review comment:
   same as above.

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