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[source]

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[source]
abstract finish() _O[source]
class afe.driver.statistic.Statistic[source]

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][source]
update: Callable[[_S, _I], None][source]
finish: Callable[[_S], _O][source]
instantiate_type() Type[StatisticInstance[_I, _O]][source]
comap(f: Callable[[_A], _I]) Statistic[_A, _O][source]

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][source]

Map a function over the output.

Parameters:

f – Function to apply to output

Returns:

Transformed Statistic