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_r236161346
########## 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) Review comment: Is is required for using "scale"-mode. F.e. you have tensor with shape (1, 3, 100, 100), so you can do BilinearResize2D(tensor, height=0.5, width=0.5, mode='scale') and get tensor of shape (1, 3, 50, 50) ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services