It’s not in the library but we have something that does this in this notebook 5 for our DeviSe lesson. See the precompute_activations_dl function, it just takes a regular model and a regular dataloader.