Skip to main content

Package to localize torch deep learning models

Project description

DeepLocalizer

PyPI - Version

Blog Post, Docs

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?

  • data is the data itself (eg text) or points to data (eg image filename)
  • positive is True for the task and False for the control (eg face images have True and control images have False)
  • validation is 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 as True. The main dataset used for localization is then False.

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

deeplocalizer-0.0.3.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deeplocalizer-0.0.3-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

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

Hashes for deeplocalizer-0.0.3.tar.gz
Algorithm Hash digest
SHA256 2397e431da8b4140399aebd32b56f04fbd50d9ce815e93a1989f5c506d3557af
MD5 74c96eed5db2c3a2680ba7e6091581d8
BLAKE2b-256 7cce2cd7f3ea03b6f9f0c08da1af9de80ae35e02e7d6a67d9587cf1e5bec3693

See more details on using hashes here.

File details

Details for the file deeplocalizer-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for deeplocalizer-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 01cde65b29fa924aa88cfa3af482e26173c162f53760a4c7e0f2e56658cb8f40
MD5 02c49fcb46a01b31eb084f3b05d01610
BLAKE2b-256 e502b9c0da8ab11a7db803f704bb28d20a2428ac4d06a41697af955277e7bc28

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page