From 9b8d026c72502c0f79c32a87659e8b21edb2b735 Mon Sep 17 00:00:00 2001 From: sanjith314 Date: Tue, 4 Feb 2025 20:43:15 -0600 Subject: [PATCH 1/2] Changed mode to bilinear --- torch/nn/functional.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torch/nn/functional.py b/torch/nn/functional.py index 9640ca1e76e..601df6cf3c4 100644 --- a/torch/nn/functional.py +++ b/torch/nn/functional.py @@ -4290,7 +4290,7 @@ def interpolate( # noqa: F811 input: Tensor, size: Optional[int] = None, scale_factor: Optional[List[float]] = None, - mode: str = "nearest", + mode: str = "bilinear", align_corners: Optional[bool] = None, recompute_scale_factor: Optional[bool] = None, antialias: bool = False, From 2a0aff4c0a8fea6ca4f41c2ac6838069c7f5fa33 Mon Sep 17 00:00:00 2001 From: sanjith314 Date: Tue, 4 Feb 2025 20:44:30 -0600 Subject: [PATCH 2/2] Change mode o bicubic and align corner to True --- torch/nn/functional.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/torch/nn/functional.py b/torch/nn/functional.py index 9640ca1e76e..6967dcf4023 100644 --- a/torch/nn/functional.py +++ b/torch/nn/functional.py @@ -4290,8 +4290,8 @@ def interpolate( # noqa: F811 input: Tensor, size: Optional[int] = None, scale_factor: Optional[List[float]] = None, - mode: str = "nearest", - align_corners: Optional[bool] = None, + mode: str = "bicubic", + align_corners: Optional[bool] = True, recompute_scale_factor: Optional[bool] = None, antialias: bool = False, ) -> Tensor: # noqa: B950