extending
https://pytorch.org/docs/master/notes/extending.html
pytorch_summary
https://github.com/sksq96/pytorch-summary/blob/master/torchsummary/torchsummary.py
https://pytorch.org/docs/master/notes/extending.html
https://github.com/sksq96/pytorch-summary/blob/master/torchsummary/torchsummary.py
Notes on fast.ai machine learning course by Jeremy Horward
pd.read_csv(low_memory=False, parse_dates)
https://youtu.be/CzdWqFTmn0Y?t=1717import logging | |
log = logging.getLogger(__name__) | |
log.setLevel(level=logging.DEBUG) | |
fmtr = logging.Formatter("[%(asctime)s] [%(levelname)-8.8s] %(message)s", "%Y-%m-%d %H:%M:%S") | |
fhdlr = logging.FileHandler(f"log.log", mode='w') | |
fhdlr.setFormatter(fmtr) | |
log.addHandler(fhdlr) |
def set_seed(seed): | |
random.seed(seed) | |
os.environ['PYTHONHASHSEED'] = str(seed) | |
np.random.seed(seed) | |
torch.manual_seed(seed) | |
torch.cuda.manual_seed(seed) | |
torch.backends.cudnn.deterministic = True |