Help protect the Great Barrier Reef with TensorFlow on Kaggle Join Challenge

tft.experimental.VocabularyCombiner

Approximately computes unique values on the PCollection.

accumulator_coder

Methods

add_input

View source

Return result of folding a batch of inputs into accumulator.

Args
accumulator the current accumulator
batch_values A list of ndarrays representing the values of the inputs for a batch, which should be added to the accumulator.

Returns: An accumulator that includes the batch of inputs.

compact

View source

Returns an equivalent but more compact represenation of the accumulator.

Args
accumulator the current accumulator.

Returns: A more compact accumulator.

create_accumulator

View source

Return a fresh, empty accumulator.

Returns: An empty accumulator. This can be any Python value.

extract_output

View source

Return result of converting accumulator into the output value.

Args
accumulator the final accumulator value.

Returns: A list of ndarrays representing the result of this combiner.

merge_accumulators

View source

Merges several accumulators to a single accumulator value.

Args
accumulators the accumulators to merge

Returns: The sole merged accumulator.

output_tensor_infos

View source

Return the number / types of outputs that are produced by extract_output.

Returns: An iterable of TensorInfo describing how the outputs that extract_output will produce should be wrapped as Tensors.

Types are required to be TensorFlow dtypes.