24 #ifndef TVM_RELAY_ATTRS_IMAGE_H_ 25 #define TVM_RELAY_ATTRS_IMAGE_H_ 52 .describe(
"Region of Interest for coordinate transformation mode 'tf_crop_and_resize'");
54 "Dimension ordering of input data. Can be 'NCW', 'NWC', etc." 55 "'N', 'C', 'W' stands for batch, channel and width" 56 "dimensions respectively. Resize is applied on the" 59 "Specify the mode to use for scaling." 60 "nearest_neighbor - Nearest Neighbor" 61 "linear - Linear Interpolation" 62 "cubic - Cubic Interpolation");
64 .set_default(
"half_pixel")
66 "Describes how to transform the coordinate in the resized tensor" 67 "to the coordinate in the original tensor." 68 "Refer to the ONNX Resize operator specification for details" 69 "Available options are half_pixel, align_corners and asymmetric");
73 "indicates how to find the \"nearest\" pixel in nearest_neighbor method" 74 "Available options are round, floor, and ceil.");
77 .describe(
"Spline Coefficient for cubic interpolation");
80 .describe(
"Flag to exclude exterior of the image during cubic interpolation");
83 .describe(
"Value to return when roi is outside of the image");
105 .describe(
"Region of Interest for coordinate transformation mode 'tf_crop_and_resize'");
107 "Dimension ordering of input data. Can be 'NCHW', 'NHWC', etc." 108 "'N', 'C', 'H', 'W' stands for batch, channel, height, and width" 109 "dimensions respectively. Resize is applied on the 'H' and" 112 "Specify the mode to use for scaling." 113 "nearest_neighbor - Nearest Neighbor" 114 "linear - Bilinear Interpolation" 115 "cubic - Bicubic Interpolation");
117 .set_default(
"half_pixel")
119 "Describes how to transform the coordinate in the resized tensor" 120 "to the coordinate in the original tensor." 121 "Refer to the ONNX Resize operator specification for details" 122 "Available options are half_pixel, align_corners and asymmetric");
124 .set_default(
"round")
126 "indicates how to find the \"nearest\" pixel in nearest_neighbor method" 127 "Available options are round, floor, and ceil.");
130 .describe(
"Spline Coefficient for Bicubic Interpolation");
133 .describe(
"Flag to exclude exterior of the image during bicubic interpolation");
136 .describe(
"Value to return when roi is outside of the image");
158 .describe(
"Region of Interest for coordinate transformation mode 'tf_crop_and_resize'");
160 "Dimension ordering of input data. Can be 'NCDHW', 'NDHWC', etc." 161 "'N', 'C', 'D', 'H', 'W' stands for batch, channel, depth, height, and width" 162 "dimensions respectively. Resize3d is applied on the 'D', 'H' and" 165 "Specify the mode to use for scaling." 166 "nearest_neighbor - Nearest Neighbor" 167 "linear - Trilinear Interpolation" 168 "cubic - Tricubic Interpolation");
170 .set_default(
"half_pixel")
172 "Describes how to transform the coordinate in the resized tensor" 173 "to the coordinate in the original tensor." 174 "Refer to the ONNX Resize operator specification for details" 175 "Available options are half_pixel, align_corners and asymmetric");
177 .set_default(
"round")
179 "indicates how to find the \"nearest\" pixel in nearest_neighbor method" 180 "Available options are round, floor, and ceil.");
183 .describe(
"Spline Coefficient for Tricubic Interpolation");
186 .describe(
"Flag to exclude exterior of the image during tricubic interpolation");
189 .describe(
"Value to return when roi is outside of the image");
205 "Dimension ordering of input data. Can be 'NCHW', 'NHWC', etc." 206 "'N', 'C', 'H', 'W' stands for batch, channel, height, and width" 207 "dimensions respectively. Resize is applied on the 'H' and" 210 .set_default(
"bilinear")
212 "Specify the mode to use for scaling." 213 "nearest_neighbor - Nearest Neighbor" 214 "bilinear - Bilinear Interpolation");
217 .describe(
"Specify value for extrapolation.");
234 .describe(
"Specifies the strides of the sliding window. [stride_height, stride_width].");
238 "If padding is non-zero, then the input is implicitly zero-padded" 239 "Padding support both symmetric and asymmetric as" 240 "one int : same padding used on all sides" 241 "two int : bottom, right will use same padding as top, left" 242 "four int : padding width in the order of (top, left, bottom, right)");
245 .describe(
"Specifies the dilation rate to use. [dilation_height, dilation_width]");
249 "Dimension ordering of input data. Can be 'NCHW', 'NHWC', etc." 250 "'N', 'C', 'H', 'W' stands for batch, channel, height, and width" 251 "dimensions respectively. Convolution is applied on the 'H' and" 256 "Dimension ordering of weight. Can be 'IHW', 'HWI', etc." 257 "'I', 'H', 'W' stands for input_channel, height, and width" 258 "dimensions respectively.");
261 .describe(
"Output data type, set to explicit type under mixed precision setting");
270 TVM_ATTR_FIELD(target_shape).describe(
"Specifies the output shape (H, W).");
283 .set_default(
"bilinear")
285 "Specify the mode to use for scaling." 286 "nearest - 2D or 3D Nearest Interpolation." 287 "bilinear - '2D Bilinear' or '3D Trilinear' Interpolation." 288 "bicubic - 2D Bicubic Interpolation.");
290 "Dimension ordering of input data. Can be 'NCHW', 'NCDHW', etc." 291 "'N', 'C', 'D', 'H', 'W' stands for batch, channel, depth, height, and width" 292 "dimensions respectively." 293 "2D Resize is applied on the 'H' and 'W' dimensions." 294 "3D Resize is applied on the 'D' and 'H' and 'W' dimensions.");
296 .set_default(
"zeros")
298 "If :attr:'grid' has values outside the range of '[-1, 1]', the corresponding" 299 "outputs are handled as defined by padding_mode. Options are" 300 "padding_mode='zeros': use '0' for out-of-bound grid locations," 301 "padding_mode='border': use border values for out-of-bound grid locations" 302 "padding_mode='reflection': use values at locations reflected by" 303 "the border for out-of-bound grid locations. For location far away" 304 "from the border, it will keep being reflected until becoming in bound," 305 "e.g., (normalized) pixel location 'x = -3.5' reflects by border '-1'" 306 "and becomes 'x' = 1.5, then reflects by border '1' and becomes" 311 "Geometrically, we consider the pixels of the" 312 "input as squares rather than points." 313 "If set to True, the extrema (-1 and 1) are considered as referring" 314 "to the center points of the input's corner pixels. If set to False, they" 315 "are instead considered as referring to the corner points of the input's corner" 316 "pixels, making the sampling more resolution agnostic.");
322 #endif // TVM_RELAY_ATTRS_IMAGE_H_ std::string rounding_method
Definition: image.h:95
TVM_DECLARE_ATTRS(CropAndResizeAttrs, "relay.attrs.CropAndResizeAttrs")
Definition: image.h:202
DataType out_dtype
Definition: image.h:152
DataType out_dtype
Definition: image.h:99
double cubic_alpha
Definition: image.h:149
TVM_DECLARE_ATTRS(Resize2DAttrs, "relay.attrs.Resize2DAttrs")
Definition: image.h:101
DataType out_dtype
Definition: image.h:46
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
Array< IndexExpr > padding
Definition: image.h:225
Attributes used in dilation operators.
Definition: image.h:223
double extrapolation_value
Definition: image.h:98
Attributes used in image crop_and_resize operator.
Definition: image.h:195
double extrapolation_value
Definition: image.h:151
Array< IndexExpr > size
Definition: image.h:90
std::string data_layout
Definition: image.h:227
DataType out_dtype
Definition: image.h:200
Attributes used in image resize1d operator.
Definition: image.h:36
String layout
Definition: image.h:277
int cubic_exclude
Definition: image.h:97
TVM_DECLARE_ATTRS(Resize3DAttrs, "relay.attrs.Resize3DAttrs")
Definition: image.h:154
std::string rounding_method
Definition: image.h:148
Array< FloatImm > roi
Definition: image.h:91
double extrapolation_value
Definition: image.h:45
Helpers for attribute objects.
double cubic_alpha
Definition: image.h:96
Array< IndexExpr > target_shape
Definition: image.h:267
std::string layout
Definition: image.h:197
Array< IndexExpr > size
Definition: image.h:37
String padding_mode
Definition: image.h:278
std::string method
Definition: image.h:40
Attributes used in image affine_grid operator.
Definition: image.h:266
std::string kernel_layout
Definition: image.h:228
String method
Definition: image.h:276
TVM_DECLARE_ATTRS(GridSampleAttrs, "relay.attrs.GridSampleAttrs")
Definition: image.h:281
Runtime primitive data type.
Definition: data_type.h:41
DataType out_dtype
Definition: image.h:229
Array< IndexExpr > dilations
Definition: image.h:226
std::string layout
Definition: image.h:145
int cubic_exclude
Definition: image.h:150
Array, container representing a contiguous sequence of ObjectRefs.
Definition: array.h:289
std::string coordinate_transformation_mode
Definition: image.h:41
std::string layout
Definition: image.h:39
std::string method
Definition: image.h:146
#define TVM_ATTR_FIELD(FieldName)
Declare an attribute field.
Definition: attrs.h:76
Reference to string objects.
Definition: string.h:98
TVM_DECLARE_ATTRS(Resize1DAttrs, "relay.attrs.Resize1DAttrs")
Definition: image.h:48
int cubic_exclude
Definition: image.h:44
Attributes used in image resize2d operator.
Definition: image.h:89
double extrapolation_value
Definition: image.h:199
Array< IndexExpr > strides
Definition: image.h:224
Array< FloatImm > roi
Definition: image.h:38
DataType NullValue< DataType >()
Definition: attrs.h:90
Array< IndexExpr > size
Definition: image.h:143
std::string rounding_method
Definition: image.h:42
Attributes used in image grid_sample operator.
Definition: image.h:275
bool align_corners
Definition: image.h:279
The base class of the all the Use "curiously recurring template pattern".
Definition: attrs.h:834
std::string method
Definition: image.h:198
Base classes for the Relay IR.
Attributes used in image resize3d operator.
Definition: image.h:142
std::string method
Definition: image.h:93
double cubic_alpha
Definition: image.h:43
TObjectRef NullValue()
Create a NodeRef type that represents null.
Definition: attrs.h:84
TVM_DECLARE_ATTRS(Dilation2DAttrs, "relay.attrs.Dilation2DAttrs")
Definition: image.h:231
Array< IndexExpr > crop_size
Definition: image.h:196
std::string coordinate_transformation_mode
Definition: image.h:94
TVM_DECLARE_ATTRS(AffineGridAttrs, "relay.attrs.AffineGridAttrs")
Definition: image.h:269
std::string layout
Definition: image.h:92
Array< FloatImm > roi
Definition: image.h:144
std::string coordinate_transformation_mode
Definition: image.h:147