# Simply pass in a learner and the module you would like to instrument def probeModule(learn, module): hook = StoreHook(learn, modules=flatten_model(module)) learn.callbacks += [ hook ] return hook