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

Activation complex dtype relu6 #23599

Merged

Conversation

mosesdaudu001
Copy link
Contributor

Added support for complex dtype for relu6, as well as _relu6_jax_like function

@jshepherd01 jshepherd01 self-assigned this Sep 14, 2023
@ivy-leaves ivy-leaves added Array API Conform to the Array API Standard, created by The Consortium for Python Data API Standards Ivy API Experimental Run CI for testing API experimental/New feature or request PaddlePaddle Backend Developing the Paddle Paddle Backend. JAX Frontend Developing the JAX Frontend, checklist triggered by commenting add_frontend_checklist Ivy Functional API labels Sep 14, 2023
@ivy-leaves
Copy link

If you are working on an open task, please edit the PR description to link to the issue you've created.

For more information, please check ToDo List Issues Guide.

Thank you 🤗

@@ -38,8 +38,8 @@ def thresholded_relu(
return tf.cast(tf.where(x > threshold, x, 0), x.dtype)


@with_unsupported_dtypes({"2.13.0 and below": ("complex",)}, backend_version)
def relu6(x: Tensor, /, *, out: Optional[Tensor] = None) -> Tensor:
# @with_unsupported_dtypes({"2.13.0 and below": ("complex",)}, backend_version)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should probably be removed completely rather than just commented out

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@jshepherd01
Copy link
Contributor

The failed tests seem to be from the tensorflow frontend trying to test with complex numbers, which causes errors in the ground truth. You should probably add complex as an unsupported dtype to specifically the tensorflow frontend function, and change the thing I mentioned above, and then it'll be good to merge

@jshepherd01 jshepherd01 merged commit 8997af3 into ivy-llc:main Sep 14, 2023
94 of 133 checks passed
@mosesdaudu001 mosesdaudu001 deleted the activation-complex-dtype-relu6 branch September 14, 2023 13:17
iababio pushed a commit to iababio/ivy that referenced this pull request Sep 27, 2023
druvdub pushed a commit to druvdub/ivy that referenced this pull request Oct 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Array API Conform to the Array API Standard, created by The Consortium for Python Data API Standards Ivy API Experimental Run CI for testing API experimental/New feature or request Ivy Functional API JAX Frontend Developing the JAX Frontend, checklist triggered by commenting add_frontend_checklist PaddlePaddle Backend Developing the Paddle Paddle Backend.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants