def _recursive_apply(self, block):
    '\n        This function is "applied" to every child in the block. This function in turn\n        registers the forward hook to each module. It helps logging the input output tensors\n        of that module.\n        '
    if (block in self.registered_blocks):
        self.logger.warning(f'The hook is already registered to block {block.name}')
        return
    block.register_forward_hook(self.forward_hook)
    self.registered_blocks.add(block)
This function is "applied" to every child in the block. This function in turn
registers the forward hook to each module. It helps logging the input output tensors
of that module.
def _recursive_apply(self, block):
    '\n        This function is "applied" to every child in the block. This function in turn\n        registers the forward hook to each module. It helps logging the input output tensors\n        of that module.\n        '
    if (block in self.registered_blocks):
        self.logger.warning(f'The hook is already registered to block {block.name}')
        return
    block.register_forward_hook(self.forward_hook)
    self.registered_blocks.add(block)