Visualize features that activate neurons via gradient ascent.
After installing PyTorch, run:
pip3 install git+https://github.com/cajal/featurevis.git
feature_vis.gradient_ascent
receives a function
Optionally, it can receive any of: a differentiable transform
regularization
a gradient_f
function post_update
function
These functions (feature_vis.ops
.
You can check the Examples.ipynb
notebook to see how to visualize features from a VGG network or real neurons[1] under different configurations.
[1]: Models for real neurons come from a private repo but the examples should still be a useful starting point.