This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import torch | |
| from torch import nn | |
| # 1. | |
| # register_forward_pre_hook(hook) | |
| # The hook will be called every time before forward() is invoked. It should have the following signature: | |
| # `hook(module, input) -> None` | |
| # The hook should not modify the input |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # To list installed distributions | |
| wsl -l | |
| wsl --list | |
| # To list installed distributions along with its running status and wsl config being 1 or 2 | |
| wsl -l --verbose | |
| wsl -l -v | |
| # To run a specific distro | |
| wsl -d distro_name |