Skip to main content

Python package for differentiable re-basin

Project description

Re-basin via implicit Sinkhorn differentiation

Implementation of paper Re-basin via implicit Sinkhorn differentiation (Accepted at CVPR 2023).

Installation

pip install sinkhorn-rebasin

Running the examples

Basics Basics
Models alignment Models alignment
Linear mode connectivity Linear mode connectivity

Models alignment

cd examples
python main_alignment_{mlp|cnn|resnet}.py
Example Layer from $\theta_A$ Layer from $\pi_{\mathcal{P}}(\theta_A)$ Layer from $\theta_B$
MLP Alignment modelA MLP Alignment pi_modelA MLP Alignment modelB MLP
VGG Alignment modelA VGG Alignment pi_modelA VGG Alignment modelB VGG
ResNet18 Alignment modelA ResNet Alignment pi_modelA ResNet Alignment modelB ResNet

Linear mode connectivity

cd examples
python main_lmc_{mlp|cnn|resnet}.py
Dataset Model Accuracy LMC Cross Entropy Loss LMC
Mnist MLP LMC MLP Accuracy LMC MLP Loss
Mnist VGG LMC VGG Accuracy LMC VGG Loss
Imagenette-320 ResNet18 LMC ResNet Accuracy LMC ResNet Loss

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

sinkhorn_rebasin-0.0.2-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file sinkhorn_rebasin-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for sinkhorn_rebasin-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bffd8d6c15487a289745bfe89727a52fbc0c6f21ab07a4aebe89074897695983
MD5 3f27860c2986473ea5563da5a3f1af75
BLAKE2b-256 0541fdb4cb7162cf3bed3d046697018f4526bf12fe51c25f1a6ff3091e315fcb

See more details on using hashes here.

Supported by

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