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

conv2d #15697

Closed
wants to merge 6 commits into from
Closed

conv2d #15697

Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions ivy/functional/backends/paddle/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,22 @@ def conv2d(
data_format: str = "NHWC",
dilations: Union[int, Tuple[int, int]] = 1,
out: Optional[paddle.Tensor] = None,
) -> paddle.Tensor:
raise IvyNotImplementedException()
):
df = "NHWC"
if data_format == "NCHW":
df = "NCHW"
rum1887 marked this conversation as resolved.
Show resolved Hide resolved
x = _pad_before_conv(x, filters, strides, padding, 2, dilations, df)
filters = paddle.transpose(filters, perm=(3, 2, 0, 1))
padding = "VALID"
res = paddle.nn.functional.conv2d(
x,
filters,
data_format=df,
stride=strides,
padding=padding,
dilation=dilations,
)
return res


# noinspection PyUnresolvedReferences
Expand Down