-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[chainerx]Implementation of Absolute #6715
Conversation
@@ -770,6 +770,17 @@ Array Cos(const Array& x) { | |||
return out; | |||
} | |||
|
|||
Array Absolute(const Array& x) { | |||
Dtype dtype = GetMathResultDtype(x.dtype()); | |||
Array out = Empty(x.shape(), dtype, x.device()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're allocating an array here which is discarded when being assigned the sum of x_flip_1
and x_flip_2
.
Thanks for the PR as always. I added some minor comments. Could you take a look? |
@@ -1630,7 +1630,7 @@ def func(self, xp, a): | |||
# Special shapes | |||
chainer.testing.product({ | |||
'shape': [(), (0,), (1,), (2, 0, 3), (1, 1, 1), (2, 3)], | |||
'in_dtypes,out_dtype': _in_out_dtypes_math_functions, | |||
'in_dtypes,out_dtype': _in_out_float_dtypes_math_functions, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you revert this change? It seems unrelated to your PR.
Can you write a Python test that checks that |
yes, I will do this. |
I have added the assertion test. But, I was not able to reproduce the python test errors (dtype mismatch) locally. |
I will check it again. |
@hvy, I have fixed all the errors. Could you have a look? |
Jenkins, test this please. |
Jenkins CI test (for commit 8b0efb1, target branch master) failed with status FAILURE. |
Jenkins, test this please. |
Jenkins CI test (for commit 8b0efb1, target branch master) failed with status FAILURE. |
The failure seems to be in TestMaxPool |
Indeed, the failures seem unrelated although there were a couple of them except max pool. Thanks for the long running PR, LGTM! |
ref issue: #6423