Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix upsample_bilinear to respect align_corner argument #1254

Merged
merged 7 commits into from
Jan 16, 2024
Merged
4 changes: 2 additions & 2 deletions onnxscript/function_libs/torch_lib/ops/nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -2298,7 +2298,7 @@ def aten_upsample_bilinear2d(
output_size: Optional[INT64] = None,
scales_h: Optional[float] = None,
scales_w: Optional[float] = None,
align_corners: bool = True,
align_corners: bool = False,
BowenBao marked this conversation as resolved.
Show resolved Hide resolved
) -> TReal:
"""upsample_bilinear2d(Tensor self, SymInt[2] output_size, bool align_corners, float? scales_h=None, float? scales_w=None) -> Tensor"""

Expand All @@ -2320,7 +2320,7 @@ def aten_upsample_bilinear2d(
def aten_upsample_bilinear2d_vec(
self: TReal,
output_size: Optional[INT64] = None,
align_corners: bool = True,
align_corners: bool = False,
scale_factors: Optional[Sequence[float]] = None,
) -> TReal:
scales_h = scale_factors[0] if scale_factors is not None else None
Expand Down
Loading