mirror of
https://github.com/huggingface/pytorch-image-models.git
synced 2025-06-03 15:01:08 +08:00
Add GIST to docstring for quick access
This commit is contained in:
parent
92b1db9a79
commit
6b18061773
@ -45,6 +45,9 @@ class ActivationStatsHook:
|
||||
module in `layer_names`.
|
||||
|
||||
Inspiration from https://docs.fast.ai/callback.hook.html.
|
||||
|
||||
Refer to https://gist.github.com/amaarora/6e56942fcb46e67ba203f3009b30d950 for an example
|
||||
on how to plot Signal Propogation Plots using `ActivationStatsHook`.
|
||||
"""
|
||||
|
||||
def __init__(self, model, hook_fn_locs, hook_fns):
|
||||
@ -79,6 +82,8 @@ def extract_spp_stats(model,
|
||||
forward pass to plot Signal Propogation Plots (SPP).
|
||||
|
||||
Paper: https://arxiv.org/abs/2101.08692
|
||||
|
||||
Example Usage: https://gist.github.com/amaarora/6e56942fcb46e67ba203f3009b30d950
|
||||
"""
|
||||
x = torch.normal(0., 1., input_shape)
|
||||
hook = ActivationStatsHook(model, hook_fn_locs=hook_fn_locs, hook_fns=hook_fns)
|
||||
|
Loading…
x
Reference in New Issue
Block a user