Table Of Contents
Table Of Contents

Block.register_forward_pre_hook

Block.register_forward_pre_hook(hook)[source]

Registers a forward pre-hook on the block.

The hook function is called immediately before forward(). It should not modify the input or output.

Parameters:hook (callable) – The forward hook function of form hook(block, input) -> None.
Returns:
Return type:mxnet.gluon.utils.HookHandle