tft.NumPyCombiner

Class NumPyCombiner

Combines the PCollection only on the 0th dimension using nparray.

Args:

  • fn: The numpy function representing the reduction to be done.
  • output_dtypes: The numpy dtype to cast each output to.
  • output_shapes: The shapes of the outputs.

__init__

__init__(
    fn,
    output_dtypes,
    output_shapes
)

Properties

accumulator_coder

Methods

add_input

add_input(
    accumulator,
    batch_values
)

create_accumulator

create_accumulator()

extract_output

extract_output(accumulator)

merge_accumulators

merge_accumulators(accumulators)

output_tensor_infos

output_tensor_infos()