Function hooks

Chainer provides a function-hook mechanism that enriches the behavior of forward and backward propagation of Function.

Base class

chainer.FunctionHook Base class of hooks for Functions.

Concrete function hooks

chainer.function_hooks.CupyMemoryProfileHook Function hook for measuring memory usage of functions in cupy memory pool.
chainer.function_hooks.PrintHook Function hook that prints debug information.
chainer.function_hooks.TimerHook Function hook for measuring elapsed time of functions.