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

feat: add interpolate function and test #26226

Closed
wants to merge 11 commits into from
17 changes: 16 additions & 1 deletion ivy/functional/backends/paddle/layers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Collection of Paddle network layers, wrapped to fit Ivy syntax and signature."""

from typing import Optional, Tuple, Union, Sequence
from typing import Optional, Tuple, Union, Sequence, List

# global
import paddle
Expand Down Expand Up @@ -494,3 +494,18 @@ def conv_general_transpose(
if data_format == "channel_last":
res = res.transpose(0, *range(2, dims + 2), 1)
return res


def interpolate(
x: paddle.Tensor,
size: List[int] = None,
scale_factor: List[int] = None,
mode: str = "nearest",
align_corners: bool = False,
align_mode: int = 0,
data_format: str = "NCHW",
name: Optional[str] = None,
):
return paddle.nn.functional.interpolate(
x, size, scale_factor, mode, align_corners, align_mode, data_format, name
)
Loading