Code Monkey home page Code Monkey logo

sinkhorn-rebasin's Introduction

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

sinkhorn-rebasin's People

Contributors

fagp avatar aktsonthalia avatar heitorrapela avatar thomasdubail avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.