Thanks to visit codestin.com
Credit goes to github.com

Skip to content

rjiang03/HCL-OT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hard Negative Sampling via Regularized Optimal Transport for Contrastive Representation Learning

This is the official code for the paper "Hard Negative Sampling via Regularized Optimal Transport for Contrastive Representation Learning". This repository contains the implementation of HCL-OT and related experiments described in the paper.

Implenment on image dataset

For instance, to run the code on the "cifar100" dataset using the entropy Optimal Transport (OT) method with a regularization parameter epsilon of 0.7:

python main.py --dataset_name "cifar100" --reg 0.7

Citation

If you find this repo useful for your research, please consider citing the paper:

@article{jiang2021hard,
  title={Hard Negative Sampling via Regularized Optimal Transport for Contrastive Representation Learning},
  author={Jiang, Ruijie and Ishwar, Prakash and Aeron, Shuchin},
  journal={arXiv preprint arXiv:2111.03169},
  year={2021}
}

For any questions, please contact Ruijie Jiang ([email protected])

Acknowledgements

This code is a modified version of the HCL implementation by Josh/HCL. The only difference from the their code is a minor alteration in the hard negative sampling approach, we change it from function "criterion" in their code to "OT_hard". To ensure a fair comparison, we have maintained all hyperparameters in Josh's implementation as they were in the original code.

Part of this code is inspired by leftthomas/SimCLR, by Josh/HCL, and by fanyun-sun/InfoGraph.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages