PyTorch Hooks Explained - In-depth Tutorial
In this video, I explain how hooks work in PyTorch. Hooks allow you to inject code into different parts of the computational graphs (in both the forward graph and the backward graph). The four types of hooks that are available in PyTorch are:
Tensor.register_hook (https://pytorch.org/docs/master/autograd.html?highlight=register#torch.Tensor.register_hook)
Module.register_forward_pre_hook (https://pytorch.org/docs/master/generated/torch.nn.Module.html?highlight=register#torch.nn.Module.register_forward_pre_hook)
Module.register_forward_hook (https://pytorch.org/docs/master/generated/torch.nn.Module.html?highlight=register#torch.nn.Module.register_forward_hook)
Module.register_backward_hook (https://pytorch.org/docs/master/generated/torch.nn.Module.html?highlight=register#torch.nn.Module.register_backward_hook)
My previous video, "PyTorch Autograd Explained - In-depth Tutorial":
📼 https://youtu.be/MswxJw-8PvE
GitHub code examples of using hooks:
💻 https://github.com/elliotwaite/pytorch-hooks-tutorial
Join our Discord community:
💬 https://discord.gg/cdQhRgw
Connect with me:
🐦 Twitter - https://twitter.com/elliotwaite
📷 Instagram - https://www.instagram.com/elliotwaite
👱 Facebook - https://www.facebook.com/elliotwaite
💼 LinkedIn - https://www.linkedin.com/in/elliotwaite
🎵 Kazukii - Return
→ https://soundcloud.com/ohthatkazuki
→ https://open.spotify.com/artist/5d07MpiIaNmmEMTq79KAga
→ https://www.youtube.com/user/OfficialKazuki
Видео PyTorch Hooks Explained - In-depth Tutorial канала Elliot Waite
Tensor.register_hook (https://pytorch.org/docs/master/autograd.html?highlight=register#torch.Tensor.register_hook)
Module.register_forward_pre_hook (https://pytorch.org/docs/master/generated/torch.nn.Module.html?highlight=register#torch.nn.Module.register_forward_pre_hook)
Module.register_forward_hook (https://pytorch.org/docs/master/generated/torch.nn.Module.html?highlight=register#torch.nn.Module.register_forward_hook)
Module.register_backward_hook (https://pytorch.org/docs/master/generated/torch.nn.Module.html?highlight=register#torch.nn.Module.register_backward_hook)
My previous video, "PyTorch Autograd Explained - In-depth Tutorial":
📼 https://youtu.be/MswxJw-8PvE
GitHub code examples of using hooks:
💻 https://github.com/elliotwaite/pytorch-hooks-tutorial
Join our Discord community:
💬 https://discord.gg/cdQhRgw
Connect with me:
🐦 Twitter - https://twitter.com/elliotwaite
📷 Instagram - https://www.instagram.com/elliotwaite
👱 Facebook - https://www.facebook.com/elliotwaite
💼 LinkedIn - https://www.linkedin.com/in/elliotwaite
🎵 Kazukii - Return
→ https://soundcloud.com/ohthatkazuki
→ https://open.spotify.com/artist/5d07MpiIaNmmEMTq79KAga
→ https://www.youtube.com/user/OfficialKazuki
Видео PyTorch Hooks Explained - In-depth Tutorial канала Elliot Waite
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
![PyTorch Autograd Explained - In-depth Tutorial](https://i.ytimg.com/vi/MswxJw-8PvE/default.jpg)
![PyTorch at Tesla - Andrej Karpathy, Tesla](https://i.ytimg.com/vi/oBklltKXtDE/default.jpg)
![What's a Tensor?](https://i.ytimg.com/vi/f5liqUk0ZTw/default.jpg)
![PyTorch Lightning - William Falcon](https://i.ytimg.com/vi/TM_jRrXYXxc/default.jpg)
![This Canadian Genius Created Modern AI](https://i.ytimg.com/vi/l9RWTMNnvi4/default.jpg)
![Why React Hooks?](https://i.ytimg.com/vi/eX_L39UvZes/default.jpg)
![React.js Hooks Crash Course](https://i.ytimg.com/vi/-MlNBTSg_Ww/default.jpg)
![The Art of Code - Dylan Beattie](https://i.ytimg.com/vi/6avJHaC3C2U/default.jpg)
![Softmax Function Explained In Depth with 3D Visuals](https://i.ytimg.com/vi/ytbYRIN0N4g/default.jpg)
![PYTORCH COMMON MISTAKES - How To Save Time 🕒](https://i.ytimg.com/vi/O2wJ3tkc-TU/default.jpg)
![What is Automatic Differentiation?](https://i.ytimg.com/vi/wG_nF1awSSY/default.jpg)
![From Research to Production with PyTorch](https://i.ytimg.com/vi/EkELQw9tdWE/default.jpg)
![Andrej Karpathy - AI for Full-Self Driving at Tesla](https://i.ytimg.com/vi/hx7BXih7zx8/default.jpg)
![Policy Gradient Theorem Explained - Reinforcement Learning](https://i.ytimg.com/vi/cQfOQcpYRzE/default.jpg)
![Python Tutorial: if __name__ == '__main__'](https://i.ytimg.com/vi/sugvnHA7ElY/default.jpg)
![But what is a Neural Network? | Deep learning, chapter 1](https://i.ytimg.com/vi/aircAruvnKk/default.jpg)
![Implementing original U-Net from scratch using PyTorch](https://i.ytimg.com/vi/u1loyDCoGbE/default.jpg)
![TorchScript and PyTorch JIT | Deep Dive](https://i.ytimg.com/vi/2awmrMRf0dA/default.jpg)
![TensorFlow vs PyTorch: Fireside](https://i.ytimg.com/vi/_Ir0ZLpFQWI/default.jpg)
![Episode 4: Implementing a PyTorch Trainer: PyTorch Lightning Trainer and callbacks under-the-hood](https://i.ytimg.com/vi/tgp56S2eGFE/default.jpg)