Calculate stable acculated sum using compensation for low-bits.
tf_agents.utils.tensor_normalizer.kahan_summation(
accumulator: tf_agents.typing.types.Float
,
carry: tf_agents.typing.types.Float
,
value: tf_agents.typing.types.Float
) -> Tuple[tf_agents.typing.types.Float
, tf_agents.typing.types.Float
]
For more details:
https://en.wikipedia.org/wiki/Kahan_summation_algorithm
Returns | |
---|---|
A tuple (accumulator, carry) such that accumulator is the new
accumulated value and carry is the new compensation value.
|