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

In float2bit, values of 0 are throwing an out of bounds bug #1

Open
sebastienwood opened this issue Oct 29, 2019 · 2 comments
Open

Comments

@sebastienwood
Copy link

Hi,

when sending a tensor from a Relu activation function to float2bit, f can take the value 0. Then, the log2 will return -inf with all the complications it ensues (out of bound error for the gather function).

One quick fix is to add a small constant to the tensor f such that it won't change the e_scientific value.

Thanks for this library, been very helpful ! :)

@joeliuz6
Copy link

a small constant means?

@wangxyustc
Copy link

Sorry, I'm in the same situation where an unexpected error is generated when entering 0 for the floating-point type

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

3 participants