apivovarov edited a comment on issue #4142: [QNN][TFLite] Parsing QNN Add op. 
Adding MobilenetV2.
URL: https://github.com/apache/incubator-tvm/pull/4142#issuecomment-561413217
 
 
   @anijain2305 I noticed that `test_forward_qnn_mobilenet_v2_net` works only 
if `random.seed(0)` is set to 0. if I set seed to say 20 - the test fails.
   
   I also tried to replace deprecated `numpy.random.random_integers` with 
`numpy.random.randint`
   the test failed as well
   
   So , looks like the test only works for particular input data started with 
47, 117,  67
   ```
   >>> np.random.seed(0)
   >>> data = np.random.random_integers(low=0, high=128, size=(1, 224, 224, 
3)).astype('uint8')
   >>> data
   array([[[[ 47, 117,  67],
            [103,   9,  21],
            [ 36,  87,  70],
            ...,
            [ 43, 110, 118],
            [ 22, 109,  11],
            [119,  26,  48]],
   ...
   ````
   ```
   # seed(1)
   Mismatch: 33.3%
   Max absolute difference: 337
   Max relative difference: 0.36951754
    x: array([886, 540, 575])
    y: array([886, 540, 912])
   
   # seed(2)
   Mismatch: 100%
   Max absolute difference: 353
   Max relative difference: 0.6537037
    x: array([845, 886, 893])
    y: array([886, 845, 540])
   ```
   
   The same issue exist for `test_forward_qnn_inception_v1_net`
   
   We should probably use real dog/cat image data for top3 labels comparison 
testing

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to