Skip to content

vision

Helpful matplotlib snippets 📈

matplotlib -- the de-facto library of plotting in Python.

seaborn -- the golden tool for statistical data visualization. Also comes with nice style defaults.

I have found myself using both libraries frequently with some style preferences that I usually adopt when creating plots. For the sake of reproducibility and convenience, I have collected some of these snippets here.

Hooks in PyTorch 🪝

To quote myself in a most recently yet-to-be-published paper:

💪 The ability of deep neural networks (DNNs) come from extracting and interpreting features from the data provided.

What we call, deep features, are the abstract, latent representations that are naturally derived from the training data fed into the DNN. They reflect a consistent activation or response of a layer/node within the model hierarchy to an input.

The features from within a pretrained VGG-11 (top) and ResNet-18 (bottom) on layers of different depths visualized.