A reducer is used for reducing a set of elements. 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
| 144 | |
| 145 | |
| 146 | class Reducer(grouping.Reducer): |
| 147 | """A reducer is used for reducing a set of elements. |
| 148 | |
| 149 | A reducer is represented as a tuple of the three functions: |
| 150 | 1) initialization function: key => initial state |
| 151 | 2) reduce function: (old state, input) => new state |
| 152 | 3) finalization function: state => result |
| 153 | """ |
| 154 | |
| 155 | @deprecation.deprecated(None, "Use `tf.data.experimental.Reducer(...)`.") |
| 156 | def __init__(self, init_func, reduce_func, finalize_func): |
| 157 | super(Reducer, self).__init__(init_func, reduce_func, finalize_func) |
no outgoing calls
no test coverage detected