singa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [singa] joddiy commented on issue #744: Could we override the test precision atot of onnx test case, atol=1e-7 is too tough?
Date Fri, 19 Jun 2020 16:30:40 GMT

joddiy commented on issue #744:
URL: https://github.com/apache/singa/issues/744#issuecomment-646732001


   @chrishkchris I have fixed the average pool and max pool issues above.
   
   However, for the equal, I found this is because there is some error when we do the `sub`
operator for int32 input:
   
   for example for input:
   
   ```
   A = np.array([[[17, 4, 9, 22, 18], [-9, 9, -1, -1, 4], [1, 14, 7, 1, 4],
                   [3, 14, -2, 3, -8]],
                   [[-25, 6, 8, -7, 22], [-14, 0, -1, 15, 14],
                   [1, 3, -8, -19, -3], [1, 12, 12, -3, -3]],
                   [[-10, -14, -17, 19, -5], [-4, -12, 7, -16, -2],
                   [-8, 3, -5, -11, 0], [4, 0, 3, -6, -3]]],
                       dtype=np.int32)
   B = np.array([[[-6, -3, -8, -17, 1], [-4, -16, 4, -9, 0],
                   [7, 1, 11, -12, 4], [-6, -8, -5, -3, 0]],
                   [[-11, 9, 4, -15, 14], [18, 11, -1, -10, 10],
                   [-4, 12, 2, 9, 3], [7, 0, 17, 1, 4]],
                   [[18, -13, -12, 9, -11], [19, -4, -7, 19, 14],
                   [18, 9, -8, 19, -2], [8, 9, -1, 6, 9]]],
                       dtype=np.int32)
   ```
   The result of `singa.__sub__(a, b)` is:
   
   ```
   [[[         -6          -3          -8         -17          17]
     [         -9          -3          -1          -1           3]
     [         -6          -3          -8         -17           3]
     [         -6          -3          -2         -17          -8]]
   
    [[        -25          -3          -8          -7          21]
     [        -14          -3          -1         -17          13]
     [         -6          -3          -8         -19          -3]
     [         -6          -3          -8          -3          -3]]
   
    [[        -10         -14         -17         -17          -5]
     [         -4         -12          -8         -16          -2]
     [         -8          -3          -5         -11 -2147483647]
     [         -6          -3          -8          -6          -3]]]
   Fs[[[         -6          -3          -8         -17          17]
     [         -9         -16          -1          -1           4]
     [-2147483642          13 -2147483644         -12           0]
     [         -6          -8          -2          -3          -8]]
   
    [[        -25 -2147483645           4          -7           8]
     [        -14 -2147483637          -1         -10           4]
     [         -4 -2147483639          -8         -19          -3]
     [-2147483642          12 -2147483643          -3          -3]]
   
    [[        -10         -14         -17          10          -5]
     [         -4         -12          -7         -16          -2]
     [         -8 -2147483642          -5         -11          -2]
     [-2147483644 -2147483639          -1          -6          -3]]]
   ```
   
   @dcslin  can we fix it?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message