View source on GitHub |
Creates a Chunker
for the given specification.
tff.analytics.heavy_hitters.iblt.create_chunker(
*,
string_max_bytes: int,
encoding: tff.analytics.heavy_hitters.iblt.CharacterEncoding
= tff.analytics.heavy_hitters.iblt.CharacterEncoding.UTF8
,
max_chunk_value: Optional[int] = None,
dtype: tf.dtypes.DType = _DEFAULT_DTYPE
) -> Chunker
Args | |
---|---|
string_max_bytes
|
Maximum length of the string to encode, in bytes. |
encoding
|
The character encoding of the string data to encode. For
non-character binary data or strings with unknown encoding, specify
CharacterEncoding.UNKNOWN . Defaults to CharacterEncoding.UTF8 .
|
max_chunk_value
|
Maximum value in each chunk. Defaults to the maximum
possible value in dtype. Only used with CharacterEncoding.UTF8 .
|
dtype
|
tf.dtypes.DType indicating the data type of the output. Must be
either tf.int32 or tf.int64 . Defaults to tf.int64 .
|
Returns | |
---|---|
A Chunker instance.
|