Skip to content

Instantly share code, notes, and snippets.

@JoshVarty
Created April 17, 2019 02:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoshVarty/71d9ad0fbb63c366971986bf0b2af745 to your computer and use it in GitHub Desktop.
Save JoshVarty/71d9ad0fbb63c366971986bf0b2af745 to your computer and use it in GitHub Desktop.
# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment