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
import sys | |
import json | |
from pprint import pprint | |
if len(sys.argv) != 2: | |
print("Usage: python pdfpc_parser.py <filename>") | |
exit(1) | |
filename = sys.argv[1] |
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
def setup_pytorch(seed: Optional[int] = None) -> torch.device: | |
""" | |
sets up pytorch with all kinds of settings and performance optimizations | |
copied from mad-project | |
""" | |
torch.backends.cudnn.enabled = True |