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 pickle | |
import sqlite3 | |
import zlib | |
from typing import TypeVar, MutableMapping, Iterator | |
import numpy as np | |
from deduplicationdict import DeDuplicationDict | |
from sqlitedict import SqliteDict | |
KT = TypeVar('KT') # Key type. |
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
from timeit import default_timer as timer | |
import numpy as np | |
import torch | |
import torch.nn as nn | |
import torch.utils.benchmark as benchmark | |
from torch.profiler import profile, ProfilerActivity | |
@torch.no_grad() |