-
Notifications
You must be signed in to change notification settings - Fork 150
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
External Product #1774
Comments
Hello @Sameeksha0709 Can you share your code and use case ? If you are only doing external products then you can probably encode a negative value in the GGSW |
Hi i am using this in Convolution operation in CNN, where weights and input both are in encrypted domain |
If you are only working on integer data then you likely need to see your data range as an unsigned integer and use the 2's complement representation https://en.wikipedia.org/wiki/Two%27s_complement If your data is floating point then you likely need to use quantization and in that case I would recommend using https://github.com/zama-ai/concrete-ml/ as they already have a lot of tools for that |
Hi i am using integer data only |
Then you should use 2’s complement For example over 3 bits [0, 4[ is still mapped to [0, 4[ but 4,5,6,7 are mapped to -4,-3,-2,-1 the good thing is the computations work the same between unsigned and signed numbers, you just have to interpret the output in a signed way. Note however that is susceptible to overflows and you are essentially computing modulo the precision you choose. |
Hi can we use negative numbers in external product. How to do external product for negative numbers.
The text was updated successfully, but these errors were encountered: