Pytorch, Optimization, Deep Learning, Artificial Intelligence, Tensorboard.
we define a wrapper function that takes a module and registers both a full_backward_hook and a full_backward_pre_hook (although in practice one should suffice). Each hook is programmed to simply add a message to the captured profiling trace using the torch.profiler.record_function function. The