sandeep-krishnamurthy commented on a change in pull request #13611: add image
resize operator and unit test
URL: https://github.com/apache/incubator-mxnet/pull/13611#discussion_r240760640
##########
File path: src/operator/image/image_random-inl.h
##########
@@ -147,6 +150,140 @@ void Normalize(const nnvm::NodeAttrs &attrs,
});
}
+struct ResizeParam : public dmlc::Parameter<ResizeParam> {
+ nnvm::Tuple<int> size;
+ bool keep_ratio;
+ int interp;
+ DMLC_DECLARE_PARAMETER(ResizeParam) {
+ DMLC_DECLARE_FIELD(size)
+ .set_default(nnvm::Tuple<int>())
+ .describe("Size of new image. Could be (width, height) or (size)");
+ DMLC_DECLARE_FIELD(keep_ratio)
+ .describe("Whether to resize the short edge or both edges to `size`, "
+ "if size is give as an integer.");
+ DMLC_DECLARE_FIELD(interp)
+ .set_default(1)
+ .describe("Interpolation method for resizing. By default uses bilinear"
Review comment:
It will be better user experience to list supported options here.
----------------------------------------------------------------
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