ML Community Day is November 9! Join us for updates from TensorFlow, JAX, and more Learn more

tf_agents.utils.tensor_normalizer.kahan_summation

Calculate stable acculated sum using compensation for low-bits.

For more details:

https://en.wikipedia.org/wiki/Kahan_summation_algorithm

accumulator Accumulator.
carry Carry for lost low-order bits.
value New value to accumlate.

A tuple (accumulator, carry) such that accumulator is the new accumulated value and carry is the new compensation value.