A collection of simple (but long) utility scripts that I use in my python projects
exposes a func create_logger which instantiates a logger with loguru and returns it.
requres:
- loguru
exposes some functions to calculate ram and vram usage and delete variables from memory . the clean_mem() function is directly copied from the code as shown in Jeremy Howard's amazing youtube playlist Practical Deep Learning Part 2 (highly recommended for anybody learning to get into diffusion models)
requires:
- loguru
- torch
- ipython
exposes a single function summary that prints the summary of a pytorch model. It has slightly less capabilities and features but is more opinionated than torchinfo.summary(). My function is heavily inspired by it.
requires:
- torch