Skip to content

Commit

Permalink
fix: Bugfix for align_corners=False- FX interpolate
Browse files Browse the repository at this point in the history
- Improve argument checking and validation to match PyTorch interpolate
arguments
- Ensure `align_corners=None` and `align_corners=False` have the same
behavior
  • Loading branch information
gs-olive committed Dec 19, 2022
1 parent f43be5b commit 0c317ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py/torch_tensorrt/fx/converters/acc_ops_converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -3630,7 +3630,7 @@ def acc_ops_interpolate(
else:
layer.resize_mode = trt.ResizeMode.NEAREST

if align_corners != None:
if (align_corners is not None) and align_corners:
layer.coordinate_transformation = (
trt.ResizeCoordinateTransformation.ALIGN_CORNERS
)
Expand Down

0 comments on commit 0c317ce

Please sign in to comment.