How to window or reset streaming operations in tensorflow?
The metrics in tf.contrib.eager.metrics (which work both with and without eager execution) have a init_variable() op you can call if you want to reset their internal variables.
Tensorflow provides all sorts of nice streaming operations to aggregate statistics along batches, such as tf.metrics.mean.
However I find that accumulating all values since the beginning often does not make a lot of sense. For example, one could rather want to have statistics per epoch, or any other time window that makes sense in a given context.
Is there any way to restrict the history of such streaming statistics, for example by reseting streaming operations so that they start over the accumulation?
Work-arounds:

accumulate by hand accross batch
use a "soft" sliding window using EMA