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
Boolean OR, AND, XOR, BitCount: Reduction operators over integers #7200
Comments
Hi @KrishnaPG , do you have use cases for these ops, especially some well-known models? Have you found similar APIs from TensorFlow's API? I just found TensorFlow's bitwise ops. |
Thank you @Linchenn The Is it available in the JS version internally (but not documented?) |
No, it has not been implemented in TensorFlow.js. It makes sense to implement this. Do you have use cases for this, or have you seen any popular or well known models that have these ops? It would be appreciated. |
I am not sure of ML Models that use these, @Linchenn . I was testing the |
Got it. Thank you for spotting it out! |
This would be great for hashing data, e.g., for bucketing. I'm currently encountering this while trying to work around missing XLA_JIT support for tf.fingerprint. |
Please make sure that this is a feature request. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:feature_template
System information
Describe the feature and the current behavior/state.
Kindly add
boolean AND, OR, XOR
,bitCount
as reduction operators over integer typed tensors.For example, for a 2-dimensional matrix, column-wise boolean AND/OR/XOR reduction should result in a 1-dimensional tensor etc. Similarly row-wise etc.
Will this change the current api? How?
New reduction operators may need to be added in addition to the existing
sum
,prod
etc. operators.These below new reduction operators may have to be added for the
integer
dType:AND
,OR
,XOR
bitCount
reduction operator that returns the total number of bits that are 1 in the given axisWho will benefit with this feature?
Any Other info.
The text was updated successfully, but these errors were encountered: