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: correct tensorflow avg pool2d test failure #26116

Merged
merged 2 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 3 additions & 1 deletion ivy/functional/frontends/tensorflow/nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ def avg_pool1d(input, ksize, strides, padding, data_format="NWC", name=None):
# avg_pool2d
@to_ivy_arrays_and_back
def avg_pool2d(input, ksize, strides, padding, data_format="NHWC", name=None):
return ivy.avg_pool2d(input, ksize, strides, padding, data_format=data_format)
return ivy.avg_pool2d(
input, ksize, strides, padding, data_format=data_format
).astype(input.dtype)


# avg_pool3d
Expand Down
2 changes: 2 additions & 0 deletions ivy_tests/test_ivy/test_frontends/test_tensorflow/test_nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,8 @@ def test_tensorflow_avg_pool2d(
ksize=ksize,
strides=strides,
padding=padding,
rtol=1e-2,
atol=1e-2,
)


Expand Down
Loading