Skip to content

Instantly share code, notes, and snippets.

@rish-16
Created May 29, 2021 06:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rish-16/5e88b1a7361c1688540aac57f7344c79 to your computer and use it in GitHub Desktop.
Save rish-16/5e88b1a7361c1688540aac57f7344c79 to your computer and use it in GitHub Desktop.
A guide on Colab TPU training using PyTorch XLA (Part 4)
def map_fn(index, flags):
'''
Contains the following:
- data preprocessing
- model instantiation
- training loop
- validation (optional)
- testing
NOTE: all code beyond this belong inside this unless otherwise stated
'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment