tvm
Loading...
Searching...
No Matches
vision.h
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
23#ifndef TVM_RELAX_OP_VISION_H_
24#define TVM_RELAX_OP_VISION_H_
25
26#include <tvm/ffi/string.h>
27#include <tvm/ir/attrs.h>
28#include <tvm/ir/type.h>
29#include <tvm/relax/expr.h>
30
31namespace tvm {
32namespace relax {
33
36 ffi::String output_format;
37
38 static void RegisterReflection();
39 TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.AllClassNonMaximumSuppressionAttrs",
41}; // struct AllClassNonMaximumSuppressionAttrs
42
44struct ROIAlignAttrs : public AttrsNode {
45 ffi::Array<int64_t> pooled_size;
48 bool aligned;
49 ffi::String layout;
50 ffi::String mode;
51
52 static void RegisterReflection();
54}; // struct ROIAlignAttrs
55
57struct ROIPoolAttrs : public AttrsNode {
58 ffi::Array<int64_t> pooled_size;
60 ffi::String layout;
61
62 static void RegisterReflection();
64}; // struct ROIPoolAttrs
65
71
72 static void RegisterReflection();
73 TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.GetValidCountsAttrs", GetValidCountsAttrs,
74 AttrsNode);
75}; // struct GetValidCountsAttrs
76
82 int top_k;
90
91 static void RegisterReflection();
92 TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.NonMaximumSuppressionAttrs",
94}; // struct NonMaximumSuppressionAttrs
95
98 bool clip;
99 double threshold;
100 ffi::Array<double> variances;
103
104 static void RegisterReflection();
105 TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.MultiboxTransformLocAttrs",
107}; // struct MultiboxTransformLocAttrs
108
109} // namespace relax
110} // namespace tvm
111
112#endif // TVM_RELAX_OP_VISION_H_
Helpers for attribute objects.
Base class of all attribute class.
Definition attrs.h:50
IR/AST nodes for TVM types shared across IR variants.
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition attr.h:23
Attributes used in AllClassNonMaximumSuppression operator.
Definition vision.h:35
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.AllClassNonMaximumSuppressionAttrs", AllClassNonMaximumSuppressionAttrs, AttrsNode)
ffi::String output_format
Definition vision.h:36
Attributes used in GetValidCounts operator.
Definition vision.h:67
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.GetValidCountsAttrs", GetValidCountsAttrs, AttrsNode)
int id_index
Definition vision.h:69
int score_index
Definition vision.h:70
double score_threshold
Definition vision.h:68
Attributes for multibox_transform_loc (SSD / TFLite-style box decode).
Definition vision.h:97
bool apply_softmax
Definition vision.h:102
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.MultiboxTransformLocAttrs", MultiboxTransformLocAttrs, AttrsNode)
bool clip
Definition vision.h:98
ffi::Array< double > variances
Definition vision.h:100
double threshold
Definition vision.h:99
bool keep_background
Definition vision.h:101
Attributes used in NonMaximumSuppression operator.
Definition vision.h:78
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.NonMaximumSuppressionAttrs", NonMaximumSuppressionAttrs, AttrsNode)
bool return_indices
Definition vision.h:86
bool force_suppress
Definition vision.h:81
int score_index
Definition vision.h:84
double iou_threshold
Definition vision.h:80
int top_k
Definition vision.h:82
double soft_nms_sigma
Definition vision.h:88
int id_index
Definition vision.h:85
int max_output_size
Definition vision.h:79
bool invalid_to_bottom
Definition vision.h:87
int coord_start
Definition vision.h:83
double score_threshold
Definition vision.h:89
Attributes used in ROIAlign operator.
Definition vision.h:44
static void RegisterReflection()
ffi::String layout
Definition vision.h:49
bool aligned
Definition vision.h:48
double spatial_scale
Definition vision.h:46
ffi::String mode
Definition vision.h:50
int sample_ratio
Definition vision.h:47
ffi::Array< int64_t > pooled_size
Definition vision.h:45
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.ROIAlignAttrs", ROIAlignAttrs, AttrsNode)
Attributes used in ROIPool operator.
Definition vision.h:57
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.ROIPoolAttrs", ROIPoolAttrs, AttrsNode)
ffi::String layout
Definition vision.h:60
static void RegisterReflection()
double spatial_scale
Definition vision.h:59
ffi::Array< int64_t > pooled_size
Definition vision.h:58