[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tests failing with conv2 and convn
From: |
Carnë Draug |
Subject: |
Re: tests failing with conv2 and convn |
Date: |
Sun, 20 Oct 2013 16:44:42 +0100 |
On 19 October 2013 14:55, "Michael D. Godfrey"
<address@hidden> wrote:
> On 10/19/2013 02:47 PM, Julien Bect wrote:
>> Hello all,
>>
>> Following some recent changesets, I have several failed tests for
>> conv2 and convn (see attachments).
>>
>> @++
>> Julien
>>
> Almost surely due to this changeset:
>
> changeset: 17696:92226d09f91a
> user: Marco Cecchetti <address@hidden>
> date: Sat Oct 19 06:36:41 2013 +0100
> files: libinterp/corefcn/conv2.cc liboctave/numeric/oct-convn.cc
> description:
> Return correct convolution for valid shape argument in convn (bug #39314)
>
> * oct-convn.cc: fix results for inner convolution (for shape option as
> valid)
> and both input matrices have more than 2 dimensions.
> * conv2.cc: add tests for convn.
I pushed that change[1]. The tests are correct now (I just pushed one
more change) , but convn() is still not working properly. I could
swear that it was passing the tests when I pushed the change but I
obviously messed up somewhere. Anyway, before the patch the results
where just wrong. With the change they seem to be wrong but a really
really small difference on the level of machine precision.
Compare the following before and after the patch.
a = rand (10, 10, 10);
b = rand (3, 3, 3);
full = convn (a, b, "full");
valid = convn (a, b, "valid");
d = full(3:10,3:10,3:10) - valid;
So the patch seems correct to me and the reasons tests were not
failing before is because there was no tests before. But yeah, there
must still be a bug somewhere.
Carnë
[1] https://savannah.gnu.org/bugs/?39314