Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rationale considering in using floor or round #9

Open
CaoZhongZ opened this issue Jun 23, 2021 · 1 comment
Open

rationale considering in using floor or round #9

CaoZhongZ opened this issue Jun 23, 2021 · 1 comment
Labels
question Further information is requested

Comments

@CaoZhongZ
Copy link

❓ What is the rationale behind floor or round

I see softmax and polynomial use floor but other places use round. What is the consideration?

@CaoZhongZ CaoZhongZ added the question Further information is requested label Jun 23, 2021
@kssteven418
Copy link
Owner

For quantization operations (e.g., QuantLinear), we normally use a round-to-nearest policy instead of floor as they are more sensitive to rounding errors. Rounding produces less error than floor in general.
When computing polynomial (e.g., softmax), I simply used floor operation as it is less sensitive to rounding error. However, you can use rounding as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants