File: test_precision.patch

package info (click to toggle)
lua-torch-torch7 0~20170926-g89ede3b-6
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,336 kB
  • sloc: ansic: 19,550; makefile: 79; sh: 20
file content (17 lines) | stat: -rw-r--r-- 447 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Purpose: Fix i386 build
Forward: not yet.

diff --git a/test/test.lua b/test/test.lua
index 7b83b9d..354e853 100644
--- a/test/test.lua
+++ b/test/test.lua
@@ -1661,7 +1661,7 @@ function torchtest.prod()
       for j = 1, 5 do
          b:cmul(y:narrow(i, j, 1))
       end
-      mytester:asserteq(maxdiff(a, b), 0, 'torch.sum value')
+      mytester:assertalmosteq(maxdiff(a, b), 0, 'torch.sum value')
    end
 end
 function torchtest.cumsum()