Giter Site home page Giter Site logo

1202kbs / ebclr Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 1.0 343 KB

Official PyTorch implementation of "Energy-Based Contrastive Learning of Visual Representations", NeurIPS 2022 Oral Paper

Home Page: https://arxiv.org/abs/2202.04933

Jupyter Notebook 8.15% Python 91.85%
contrastive-learning energy-based-model

ebclr's Introduction

EBCLR

Official PyTorch implementation of Energy-Based Contrastive Learning of Visual Representations, NeurIPS 2022.

We propose a visual representation learning framework, Energy-Based Contrastive Learning (EBCLR), that combines Energy-Based Models (EBMs) with contrastive learning. EBCLR associates distance on the projection space with the density of positive pairs to learn useful visual representations. The figure below illustrates the general idea of EBCLR. We find EBCLR shows accelerated convergence and robustness to small number of negative pairs per positive pair.

How to Run This Code

Example codes for training and linear / KNN evaluation can be found in Train.ipynb and Evaluation.ipynb, respectively.

References

If you find the code useful for your research, please consider citing

@inproceedings{
  kim2022ebclr,
  title={Energy-Based Contrastive Learning of Visual Representations},
  author={Beomsu Kim and Jong Chul Ye},
  booktitle={NeurIPS},
  year={2022}
}

ebclr's People

Contributors

1202kbs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

zixind

ebclr's Issues

A bug, maybe

Dear authors:

The definition of the function 'clamp' may be missing on line 246 in './libs/ebclr.py', could you please fix it?

Best

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.