File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
core/conversion/converters/impl Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -109,17 +109,9 @@ void resize_layer_size(
109
109
resize_layer->setResizeMode (mode);
110
110
resize_layer->setName (util::node_info (n).c_str ());
111
111
112
- // if interpolation mode is linear, align corners must have been set to true.
113
- // else, don't use align corners.
114
- if (mode == nvinfer1::ResizeMode::kLINEAR ) {
115
- #if NV_TENSORRT_MAJOR < 7 || (NV_TENSORRT_MAJOR == 7 && NV_TENSORRT_MINOR < 1) // IF TRT VERSION <= 7.0
116
- TRTORCH_CHECK (align_corners, " resize layer (linear) only supports align_corners=True in TensorRT <= 7.0" );
117
- resize_layer->setAlignCorners (true );
118
- #else
119
- resize_layer->setAlignCorners (align_corners);
120
- #endif
112
+ if (align_corners) {
113
+ resize_layer->setCoordinateTransformation (nvinfer1::ResizeCoordinateTransformation::kALIGN_CORNERS );
121
114
}
122
-
123
115
auto layer_output = ctx->AssociateValueAndTensor (n->outputs ()[0 ], resize_layer->getOutput (0 ));
124
116
125
117
LOG_DEBUG (" Output tensor shape: " << layer_output->getDimensions ());
You can’t perform that action at this time.
0 commit comments