Closed Holt59 closed 1 year ago
So apparently there is a bug in the version of tensorflow used for the test (2.1.2?). The k
parameter for tf.linalg.diag
and tf.linalg.diag_part
is completely neglected.
Let's call the method diag
not _diag
. No need limit diag
to ep.diag
. Might be nice to chain diag
like other methods.
Let's call the method
diag
not_diag
. No need limitdiag
toep.diag
. Might be nice to chaindiag
like other methods.
Done. I've also reverted the change to test_transpose_1d
I made by mistake.
Thanks! Seems a couple of tests fail because the frameworks return inconsistent results.
Thanks! Seems a couple of tests fail because the frameworks return inconsistent results.
Yes, as I said in a previous comment, the tensorflow version used in the CI tests has a bug regarding the k
parameter in tf.linalg.diag
(see the link in the previous comment).
I've rebased the PR from master
to get the upgraded TF in tests, hopefully this should fix the bug previously mentioned.
Closes #21
Implements
eagerpy.diag
, followingnumpy
/torch
convention:This cannot handle batched inputs like Tensorflow
linalg.diag
orlinalg.diag_part
, but I think it's cleaner that way, let me know what you think.