Created
May 29, 2021 05:54
-
-
Save rish-16/6999153722072adb7f7577842762f8ef to your computer and use it in GitHub Desktop.
A guide on Colab TPU training using PyTorch XLA (Part 3)
This file contains 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
class MyCustomNet(nn.Module): | |
def __init__(self, myparams): | |
super().__init__() | |
# define layers | |
... | |
def forward(self, x): | |
''' | |
Pass your inputs through your layers as you normally would. | |
No change here. | |
''' | |
return layers(x) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment