added zeta in paddle elementwise.py#13409
Merged
Merged
Conversation
MahmoudAshraf97
suggested changes
Mar 30, 2023
Contributor
MahmoudAshraf97
left a comment
There was a problem hiding this comment.
don't forget the unsupported ditypes decorator, uint16 and bfloat16 are unsupported in all functions, and if there are more dtypes that you cant support, add them accordingly
@with_unsupported_device_and_dtypes(
{"2.4.2 and below": {"cpu": ("uint16", "bfloat16")}}, backend_version
)
also the result is different than the ground truth, this is also a problem in the numpy implementation where this is derived from, so you will need to rethink this again
E AssertionError: the results from backend paddle and ground truth framework tensorflow do not match
E [2.]!=[1.64493407]
E
E
E Falsifying example: test_zeta(
E dtype_and_x=(['float64', 'float64'], [array([2.]), array([1.])]),
| temp = ivy.logical_and(ivy.not_equal(ivy.remainder(x, 2), 0), ivy.greater(x, 1)) | ||
| temp = ivy.logical_and(temp, ivy.less_equal(q, 0)) | ||
| nan_indices = ivy.logical_or(temp, ivy.less(x, 1)) | ||
| n, res = 1, 1 / q**x |
Contributor
There was a problem hiding this comment.
in this line and the following lop there are two issues:
qandxare tensors, so use ivy elementwise ops instead,ivy.addinstead of+for example- this implementation is extremely slow compared to other backends and I thinks it's because of this loop
Contributor
Author
There was a problem hiding this comment.
yes, I agree
I will make the changes.
Contributor
Author
|
hi @MahmoudAshraf97 I have used jax implementation and also we need to update numpy backend zeta function. |
fix left over numpy syntax
MuhammedAshraf2020
pushed a commit
to MuhammedAshraf2020/ivy
that referenced
this pull request
Apr 9, 2023
Co-authored-by: Mahmoud Ashraf <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

zeta #13408