Closed liujuncn closed 1 year ago
Hey, thanks for your feedback. I think it should be fairly straightforward to create a filter which results in specific hooks not being attached undesired layers. I will look into it.
Okay, got it, checkout this branch https://github.com/delve-team/delve/tree/feature/layer_filter
SaturationTracker
now has an additional argument layer_filter
, which accepts a user-defined function for manipulating the dictionary of tracked layers.
The tracked layers are held in a dictionary mapping their names (strings) to the nn.Module
-objects.
For installation, please clone the branch, navigate into the repositories folder and pip install -e .
to install this new version.
If this solves your issue, I will include it in the next release.
Yes, the filter works.
Wait for your next release.
Release 0.1.50
is out now, containing the layer filters, you requested
https://pypi.org/project/delve/
thank you for your constructive feedback.
Too many layers can cause GPU OOM when tracking large models. So is it possible to track only some of all layers.
For example,
tracker = SaturationTracker( modules=some_model, layers = [layer_1, layer_4, ..., layer_last] )