tglite.TBlock.apply

TBlock.apply(fn: Callable, need_nbrs=True, run_hooks=True)

Applies an operator to the block itself and returns the output.

Parameters:
  • fn (Callable) – The function to apply to the block itself.

  • need_nbrs (bool) – Whether sampled neighbors are needed.

  • run_hooks – Whether to run registered hooks.