Skip to content

Commit 0c317ce

Browse files
committed
fix: Bugfix for align_corners=False- FX interpolate
- Improve argument checking and validation to match PyTorch interpolate arguments - Ensure `align_corners=None` and `align_corners=False` have the same behavior
1 parent f43be5b commit 0c317ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/torch_tensorrt/fx/converters/acc_ops_converters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3630,7 +3630,7 @@ def acc_ops_interpolate(
36303630
else:
36313631
layer.resize_mode = trt.ResizeMode.NEAREST
36323632

3633-
if align_corners != None:
3633+
if (align_corners is not None) and align_corners:
36343634
layer.coordinate_transformation = (
36353635
trt.ResizeCoordinateTransformation.ALIGN_CORNERS
36363636
)

0 commit comments

Comments
 (0)