Join the SIG TFX-Addons community and help make TFX even better!


Computes the count of each element of a Tensor.

key A Tensor or SparseTensor of dtype tf.string or
key_vocabulary_filename (Optional) The file name for the key-output mapping file. If None and key are provided, this combiner assumes the keys fit in memory and will not store the result in a file. If empty string, a file name will be chosen based on the current scope. If not an empty string, should be unique within a given preprocessing function.
name (Optional) A name for this operation.

Either (A) Two Tensors: one the key vocab with dtype of input; the other the count for each key, dtype tf.int64. (if key_vocabulary_filename is None). (B) The filename where the key-value mapping is stored (if key_vocabulary_filename is not None).

TypeError If the type of x is not supported.