Pytorch, Optimization, Deep Learning, Artificial Intelligence, Tensorboard.
supports registering hooks to both torch.Tensors and torch.nn.Modules. Although the technique we will propose in this post will rely on registering backward hooks to modules, tensor-hook registering can be similarly used to either replace or augment the module-based method. In the code block below