[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-26 UTC."],[],[],null,["# tf.raw_ops.PopulationCount\n\n\u003cbr /\u003e\n\nComputes element-wise population count (a.k.a. popcount, bitsum, bitcount).\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.raw_ops.PopulationCount`](https://www.tensorflow.org/api_docs/python/tf/raw_ops/PopulationCount)\n\n\u003cbr /\u003e\n\n tf.raw_ops.PopulationCount(\n x, name=None\n )\n\nFor each entry in `x`, calculates the number of `1` (on) bits in the binary\nrepresentation of that entry.\n| **Note:** It is more efficient to first [`tf.bitcast`](../../tf/bitcast) your tensors into `int32` or `int64` and perform the bitcount on the result, than to feed in 8- or 16-bit inputs and then aggregate the resulting counts.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|--------|---------------------------------------------------------------------------------------------------------------------------|\n| `x` | A `Tensor`. Must be one of the following types: `int8`, `int16`, `int32`, `int64`, `uint8`, `uint16`, `uint32`, `uint64`. |\n| `name` | A name for the operation (optional). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A `Tensor` of type `uint8`. ||\n\n\u003cbr /\u003e"]]