Package to localize torch deep learning models
Project description
DeepLocalizer
Quickly find functional specialization in PyTorch models.
Extends The LLM Language Network: A Neuroscientific Approach for Identifying Causally Task-Relevant Units to other models and data.
Examples:
Task Usage
Tasks are just pandas dataframes with a data, positive, and validation columns. Each row is a different data point.
See face_data_viewer.ipynb to see a real example of a face localizer data (face images from CelebA vs. objects images from COCO).
What do the columns mean?
datais the data itself (eg text) or points to data (eg image filename)positiveisTruefor the task andFalsefor the control (eg face images haveTrueand control images haveFalse)validationis technically optional. If you want to notate some rows to only be used later on to test performance and not for the main localization, you can indicate a subset of the rows asTrue. The main dataset used for localization is thenFalse.
Again see face_data_viewer.ipynb if you're still confused.
Library Usage
Install
uv add deeplocalizer
or
pip install deeplocalizer
API Usage
See exact functions at Docs and see resnet34_example.ipynb for an example of using those functions.
Development
cd deeplocalizer # this git repo
Make sure to have https://docs.astral.sh/uv/ installed.
Install and Run
uv sync
uv run deeplocalizer/deeplocalizer.py
or run an example python notebook within the .env generated.
Run Docs
uv run mkdocs serve
References
papers
code/datasets
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deeplocalizer-0.0.3.tar.gz.
File metadata
- Download URL: deeplocalizer-0.0.3.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2397e431da8b4140399aebd32b56f04fbd50d9ce815e93a1989f5c506d3557af
|
|
| MD5 |
74c96eed5db2c3a2680ba7e6091581d8
|
|
| BLAKE2b-256 |
7cce2cd7f3ea03b6f9f0c08da1af9de80ae35e02e7d6a67d9587cf1e5bec3693
|
File details
Details for the file deeplocalizer-0.0.3-py3-none-any.whl.
File metadata
- Download URL: deeplocalizer-0.0.3-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01cde65b29fa924aa88cfa3af482e26173c162f53760a4c7e0f2e56658cb8f40
|
|
| MD5 |
02c49fcb46a01b31eb084f3b05d01610
|
|
| BLAKE2b-256 |
e502b9c0da8ab11a7db803f704bb28d20a2428ac4d06a41697af955277e7bc28
|