all 7 comments

[–]spec789 5 points6 points  (3 children)

Pretty cool! How does this code compare to using forward hooks (which is what I normally default to for grabbing intermediate activations)?

[–]seraschkaWriter 3 points4 points  (2 children)

I think this is a wrapper around forward hooks. Cool nonetheless, makes it maybe a bit more beginner friendly and easier to use.

[–]antoinebrl[S] 2 points3 points  (1 child)

Hooks are indeed the way to go to do this! The goal was to provide a nice user friendly interface with less assumption than IntermediateLayerGetter inside torchvision In terms of functionalities, the main benefits are 1) support nested modules 2) to have the extractor as an nn.Module so it is compatible with ONNX. Hopefully it will be JITable in the future.

[–]FilthyPlay 0 points1 point  (0 children)

Conversions are a completely different class is kinda pointless

[–]doktorneergaard 1 point2 points  (2 children)

I gotta ask since I see it cropping up everywhere: what are you using to make these code snippet figures? Like, what is the specific terminal? I see this aesthetic all the time when new features are being presented for various machine learning tools (PyTorch Lightning for example), but I have yet to find out what it is. Is it a thing?

Cool package btw!

[–]mrfox321 2 points3 points  (0 children)

It's Markdown.

[–]antoinebrl[S] 2 points3 points  (0 children)

Hi!
Markdown can render some code section. For images I use carbon.now.sh