kpuatamazon opened a new pull request #19201:
URL: https://github.com/apache/incubator-mxnet/pull/19201


   ## Description ##
   This is testing a quantizer by comparing with other MXNet operators like 
round.  There's one ambiguous case, which is what to do with 0.5, 1.5, -0.5, 
etc.  Implementations can disagree (plus floating point rounding might push 
things to the side a bit) and that's ok.  So to make things consistent, I 
pushed random values between (0.45 and 0.55) away from 0.5 by adding. . . 0.05. 
 That was dumb because it just mapped values in (0.45, 0.55) to (0.5, 0.6) 
which still had the same rounding issue and triggered a flaky test #19197.  
This PR remaps (0.45, 0.55) to (0.65, 0.75) ensuring no value is near 0.5 when 
it is rounded.  Then quantized values can be compared exactly.  
   
   ## Checklist ##
   ### Essentials ###
   - [x] PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], 
[FEATURE], [DOC], etc)
   - [x] Changes are complete (i.e. I finished coding on this PR)
   - [x] All changes have test coverage
   - [x] Code is well-documented
   
   ### Changes ###
   - [x] Fix flaky test
   
   ## Comments ##
   There will be another PR for master.  


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


Reply via email to