tf.contrib.data.Reducer
Stay organized with collections
Save and categorize content based on your preferences.
A reducer is used for reducing a set of elements.
Inherits From: Reducer
tf.contrib.data.Reducer(
init_func, reduce_func, finalize_func
)
A reducer is represented as a tuple of the three functions:
1) initialization function: key => initial state
2) reduce function: (old state, input) => new state
3) finalization function: state => result
Attributes |
finalize_func
|
|
init_func
|
|
reduce_func
|
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.contrib.data.Reducer\n\n\u003cbr /\u003e\n\n|-----------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/data/python/ops/grouping.py#L146-L157) |\n\nA reducer is used for reducing a set of elements.\n\nInherits From: [`Reducer`](../../../tf/data/experimental/Reducer) \n\n tf.contrib.data.Reducer(\n init_func, reduce_func, finalize_func\n )\n\nA reducer is represented as a tuple of the three functions:\n\n1) initialization function: key =\\\u003e initial state\n2) reduce function: (old state, input) =\\\u003e new state\n3) finalization function: state =\\\u003e result\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Attributes ---------- ||\n|-----------------|---------------|\n| `finalize_func` | \u003cbr /\u003e \u003cbr /\u003e |\n| `init_func` | \u003cbr /\u003e \u003cbr /\u003e |\n| `reduce_func` | \u003cbr /\u003e \u003cbr /\u003e |\n\n\u003cbr /\u003e"]]