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

Error: Divided by 0. #17

Open
woriazzc opened this issue Feb 18, 2022 · 3 comments
Open

Error: Divided by 0. #17

woriazzc opened this issue Feb 18, 2022 · 3 comments

Comments

@woriazzc
Copy link

Thanks for your the implementation!

In LsqQuan.

x = x / s_scale

If s_scale contains 0, there will be Divided by 0 Error, and the training loss will become nan.
Maybe eps should be used.

@zhutmost
Copy link
Owner

zhutmost commented Feb 18, 2022 via email

@lippman1125
Copy link

Looks that it is very rarely seen. s_scale is a floating pointed number, it generally does not become 0 during training. I will try to add an eps, when I have spare time. (it need some experiments)

Not rarely.

@flymmmfly
Copy link

Not rarely.

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

No branches or pull requests

4 participants