From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?G=C3=A1bor?= Boskovits Subject: bug#39562: python-keras build fails: test_selu: Not equal to tolerance rtol=1e-07, atol=0 Date: Tue, 11 Feb 2020 20:25:31 +0100 Message-ID: References: <87blq51jqu.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000007a588c059e51d270" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:34200) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1bAZ-0005O8-4Q for bug-guix@gnu.org; Tue, 11 Feb 2020 14:26:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1bAX-0007Yc-Ss for bug-guix@gnu.org; Tue, 11 Feb 2020 14:26:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:51593) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j1bAX-0007Xm-Mi for bug-guix@gnu.org; Tue, 11 Feb 2020 14:26:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j1bAX-0002JP-IC for bug-guix@gnu.org; Tue, 11 Feb 2020 14:26:01 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87blq51jqu.fsf@ambrevar.xyz> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane-mx.org@gnu.org Sender: "bug-Guix" To: Pierre Neidhardt Cc: 39562@debbugs.gnu.org --0000000000007a588c059e51d270 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable This resembles to the babl issue we are having. Is it possible that this is hardware related? Pierre Neidhardt ezt =C3=ADrta (id=C5=91pont: 2020. feb= r. 11., Ke 16:19): > Tests fail with: > > --8<---------------cut here---------------start------------->8--- > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D FAILURES > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > __________________________________ test_selu > ___________________________________ > > def test_selu(): > x =3D K.placeholder(ndim=3D2) > f =3D K.function([x], [activations.selu(x)]) > alpha =3D 1.6732632423543772848170429916717 > scale =3D 1.0507009873554804934193349852946 > > positive_values =3D get_standard_values() > result =3D f([positive_values])[0] > assert_allclose(result, positive_values * scale, rtol=3D1e-05) > > negative_values =3D np.array([[-1, -2]], dtype=3DK.floatx()) > > result =3D f([negative_values])[0] > true_result =3D (np.exp(negative_values) - 1) * scale * alpha > > > assert_allclose(result, true_result) > E AssertionError: > E Not equal to tolerance rtol=3D1e-07, atol=3D0 > E > E Mismatch: 50% > E Max absolute difference: 1.1920929e-07 > E Max relative difference: 1.0726715e-07 > E x: array([[-1.111331, -1.520167]], dtype=3Dfloat32) > E y: array([[-1.111331, -1.520167]], dtype=3Dfloat32) > > tests/keras/activations_test.py:226: AssertionError > --8<---------------cut here---------------end--------------->8--- > > See attached log. > > -- > Pierre Neidhardt > https://ambrevar.xyz/ > --0000000000007a588c059e51d270 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
This resembles to the babl issue we are having. Is it pos= sible that this is hardware related?

Pierre Neidhardt <mail@ambrevar.xyz> ezt =C3=ADrta (id=C5=91pont: 2= 020. febr. 11., Ke 16:19):
Tests fa= il with:

--8<---------------cut here---------------start------------->8---
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D FAILURES =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D __________________________________ test_selu ______________________________= _____

=C2=A0 =C2=A0 def test_selu():
=C2=A0 =C2=A0 =C2=A0 =C2=A0 x =3D K.placeholder(ndim=3D2)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 f =3D K.function([x], [activations.selu(x)]) =C2=A0 =C2=A0 =C2=A0 =C2=A0 alpha =3D 1.6732632423543772848170429916717
=C2=A0 =C2=A0 =C2=A0 =C2=A0 scale =3D 1.0507009873554804934193349852946

=C2=A0 =C2=A0 =C2=A0 =C2=A0 positive_values =3D get_standard_values()
=C2=A0 =C2=A0 =C2=A0 =C2=A0 result =3D f([positive_values])[0]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 assert_allclose(result, positive_values * scale= , rtol=3D1e-05)

=C2=A0 =C2=A0 =C2=A0 =C2=A0 negative_values =3D np.array([[-1, -2]], dtype= =3DK.floatx())

=C2=A0 =C2=A0 =C2=A0 =C2=A0 result =3D f([negative_values])[0]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 true_result =3D (np.exp(negative_values) - 1) *= scale * alpha

>=C2=A0 =C2=A0 =C2=A0 =C2=A0assert_allclose(result, true_result)
E=C2=A0 =C2=A0 =C2=A0 =C2=A0AssertionError:
E=C2=A0 =C2=A0 =C2=A0 =C2=A0Not equal to tolerance rtol=3D1e-07, atol=3D0 E
E=C2=A0 =C2=A0 =C2=A0 =C2=A0Mismatch: 50%
E=C2=A0 =C2=A0 =C2=A0 =C2=A0Max absolute difference: 1.1920929e-07
E=C2=A0 =C2=A0 =C2=A0 =C2=A0Max relative difference: 1.0726715e-07
E=C2=A0 =C2=A0 =C2=A0 =C2=A0 x: array([[-1.111331, -1.520167]], dtype=3Dflo= at32)
E=C2=A0 =C2=A0 =C2=A0 =C2=A0 y: array([[-1.111331, -1.520167]], dtype=3Dflo= at32)

tests/keras/activations_test.py:226: AssertionError
--8<---------------cut here---------------end--------------->8---

See attached log.

--
Pierre Neidhardt
https://ambrevar.xyz/
--0000000000007a588c059e51d270--