singa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [singa] dcslin commented on issue #744: Related to some test_onnx_backend.py test cases
Date Mon, 13 Jul 2020 03:32:19 GMT

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


   > @chrishkchris I have fixed the average pool and max pool issues above in #746
   > 
   > 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]]]
   > ```
   > 
   > The correct result should be:
   > 
   > ```
   > [[[ 23,   7,  17,  39,  17],
   >         [ -5,  25,  -5,   8,   4],
   >         [ -6,  13,  -4,  13,   0],
   >         [  9,  22,   3,   6,  -8]],
   > 
   >        [[-14,  -3,   4,   8,   8],
   >         [-32, -11,   0,  25,   4],
   >         [  5,  -9, -10, -28,  -6],
   >         [ -6,  12,  -5,  -4,  -7]],
   > 
   >        [[-28,  -1,  -5,  10,   6],
   >         [-23,  -8,  14, -35, -16],
   >         [-26,  -6,   3, -30,   2],
   >         [ -4,  -9,   4, -12, -12]]]
   > ```
   > 
   > @dcslin can we fix it?
   
   this int subtraction testing is fixed and added in https://github.com/apache/singa/pull/763


----------------------------------------------------------------
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