afe.driver.statistic

Analysis of statistics on tensors.

Classes

StatisticInstance

A collector of statistics on a stream of inputs.

Statistic

A method of computing a property over a stream of inputs.

Module Contents

class afe.driver.statistic.StatisticInstance

A collector of statistics on a stream of inputs. With an instance of the class, inputs are supplied repeatedly by calling update, then the computed result is read by calling finish.

abstract update(x: _I) None
abstract finish() _O
class afe.driver.statistic.Statistic

A method of computing a property over a stream of inputs. The property is normally a reduction, e.g., the average of the mean squared errors of all inputs.

initialize: Callable[[], _S]
update: Callable[[_S, _I], None]
finish: Callable[[_S], _O]
instantiate_type() Type[StatisticInstance[_I, _O]]
comap(f: Callable[[_A], _I]) Statistic[_A, _O]

Map a function over the input stream.

Parameters:

f – Function to apply to inputs

Returns:

Transformed Statistic

map(f: Callable[[_O], _A]) Statistic[_I, _A]

Map a function over the output.

Parameters:

f – Function to apply to output

Returns:

Transformed Statistic