jwfromm commented on a change in pull request #4417: [TOPI][RELAY][OP] add op
crop_and_resize
URL: https://github.com/apache/incubator-tvm/pull/4417#discussion_r350348257
##########
File path: include/tvm/relay/attrs/image.h
##########
@@ -60,6 +60,34 @@ struct ResizeAttrs : public tvm::AttrsNode<ResizeAttrs> {
}
};
+/*! \brief Attributes used in image crop_and_resize operator */
+struct CropAndResizeAttrs : public tvm::AttrsNode<CropAndResizeAttrs> {
+ Array<IndexExpr> crop_size;
+ std::string layout;
+ std::string method;
+ double extrapolation_value;
+ DataType out_dtype;
+
+ TVM_DECLARE_ATTRS(CropAndResizeAttrs, "relay.attrs.CropAndResizeAttrs") {
+ TVM_ATTR_FIELD(crop_size).set_default(NullValue<Array<IndexExpr> >())
+ .describe("Target Size.");
+ TVM_ATTR_FIELD(layout).set_default("NCHW")
Review comment:
Resize requires knowing which axes are the spatial dimensions, so having the
layout as an attribute is necessary.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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