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
Release files for deeplocalizer 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| deeplocalizer-0.0.3.tar.gz | 9.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| deeplocalizer-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.7 kB
Release files / deeplocalizer-0.0.3.tar.gz
| Download URL | deeplocalizer-0.0.3.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2397e431da8b4140399aebd32b56f04fbd50d9ce815e93a1989f5c506d3557af
|
|
BLAKE2b-256 checksum How to use checksums |
7cce2cd7f3ea03b6f9f0c08da1af9de80ae35e02e7d6a67d9587cf1e5bec3693
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.3
|
Release files / deeplocalizer-0.0.3-py3-none-any.whl
| Download URL | deeplocalizer-0.0.3-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
01cde65b29fa924aa88cfa3af482e26173c162f53760a4c7e0f2e56658cb8f40
|
|
BLAKE2b-256 checksum How to use checksums |
e502b9c0da8ab11a7db803f704bb28d20a2428ac4d06a41697af955277e7bc28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.3
|