Creates a dataset that computes a group-by on input_dataset
.
tf.raw_ops.GroupByReducerDataset( input_dataset, key_func_other_arguments, init_func_other_arguments, reduce_func_other_arguments, finalize_func_other_arguments, key_func, init_func, reduce_func, finalize_func, output_types, output_shapes, name=None )
Creates a dataset that computes a group-by on input_dataset
.
Args | |
---|---|
input_dataset | A Tensor of type variant . A variant tensor representing the input dataset. |
key_func_other_arguments | A list of Tensor objects. A list of tensors, typically values that were captured when building a closure for key_func . |
init_func_other_arguments | A list of Tensor objects. A list of tensors, typically values that were captured when building a closure for init_func . |
reduce_func_other_arguments | A list of Tensor objects. A list of tensors, typically values that were captured when building a closure for reduce_func . |
finalize_func_other_arguments | A list of Tensor objects. A list of tensors, typically values that were captured when building a closure for finalize_func . |
key_func | A function decorated with @Defun. A function mapping an element of input_dataset , concatenated with key_func_other_arguments to a scalar value of type DT_INT64. |
init_func | A function decorated with @Defun. A function mapping a key of type DT_INT64, concatenated with init_func_other_arguments to the initial reducer state. |
reduce_func | A function decorated with @Defun. A function mapping the current reducer state and an element of input_dataset , concatenated with reduce_func_other_arguments to a new reducer state. |
finalize_func | A function decorated with @Defun. A function mapping the final reducer state to an output element. |
output_types | A list of tf.DTypes that has length >= 1 . |
output_shapes | A list of shapes (each a tf.TensorShape or list of ints ) that has length >= 1 . |
name | A name for the operation (optional). |
Returns | |
---|---|
A Tensor of type variant . |
© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.4/api_docs/python/tf/raw_ops/GroupByReducerDataset