chainer.function_hooks.TimerHook

class chainer.function_hooks.TimerHook[source]

Function hook for measuring elapsed time of functions.

Variables:call_history – List of measurement results. It consists of pairs of the function that calls this hook and the elapsed time the function consumes.

Methods

__enter__()[source]
__exit__(*_)[source]
backward_postprocess(function, in_data, out_grad)[source]
backward_preprocess(function, in_data, out_grad)[source]
forward_postprocess(function, in_data)[source]
forward_preprocess(function, in_data)[source]
total_time()[source]

Returns total elapsed time in seconds.

Attributes

name = 'TimerHook'