← Open Source
PatrickHua

SimSiam

A pytorch implementation for paper 'Exploring Simple Siamese Representation Learning'.

Model DevelopmentArchitecturePython
Open on GitHub
Momentum
+0stars in 24 hours0.0%
827
Stars
134
Forks
+0
This week
6
Contributors
Created 2020-11-27 · Updated 2026-09-08 · #13414 today
Top developers
PatrickHuabtwardowleodesigner

PatrickHua/SimSiam is ranked 13,414 with 827 stars.

Same-category comparison

PatrickHua/SimSiam is ranked 13,414 among these 8 peers; SMILELab-FL/FedLab is ranked 13,415.

Same-category comparison
NameRankMetrics
Victorwz/LongMem13,395
Language:
Python
Stars:
829
Forks:
73
Description:
Official implementation of our NeurIPS 2023 paper "Augmenting Language Models with Long-Term Memory".
lucidrains/rotary-embedding-torch13,402
Language:
Python
Stars:
829
Forks:
69
Description:
Implementation of Rotary Embeddings, from the Roformer paper, in Pytorch.
taichi-dev/taichi-nerfs13,405
Language:
Python
Stars:
829
Forks:
55
Description:
Implementations of NeRF variants based on Taichi + PyTorch.
openai/large-scale-curiosity13,411
Language:
Python
Stars:
828
Forks:
185
Description:
Code for the paper "Large-Scale Study of Curiosity-Driven Learning".
SMILELab-FL/FedLab13,415
Language:
Jupyter Notebook
Stars:
827
Forks:
141
Description:
A flexible Federated Learning Framework based on PyTorch, simplifying your Federated Learning research.
carpedm20/MemN2N-tensorflow13,425
Language:
Python
Stars:
826
Forks:
245
Description:
"End-To-End Memory Networks" in Tensorflow.
AntreasAntoniou/HowToTrainYourMAMLPytorch13,431
Language:
Python
Stars:
825
Forks:
146
Description:
The original code for the paper "How to train your MAML" along with a replication of the original "Model Agnostic Meta Learning" (MAML) paper in Pytorch.
VITA-Group/LightGaussian13,434
Language:
Python
Stars:
825
Forks:
76
Description:
[NeurIPS 2024 Spotlight]"LightGaussian: Unbounded 3D Gaussian Compression with 15x Reduction and 200+ FPS", Zhiwen Fan, Kevin Wang, Kairun Wen, Zehao Zhu, Dejia Xu, Zhangyang Wang.
Key parameters and specifications
Key parameters and specifications
ParameterValue
LanguagePython
CategoryModel Development
SubcategoryArchitecture
Stars827
Forks134
Contributors6
Created date2020-11-27
Updated date2026-09-08
Stars in 1 day0
Stars in 7 days0
Rank13,414
Previous rank13,317
Rank change-97
7-day stars rank13,929
Previous 7-day stars rank13,948
7-day stars rank change19
Total stars rank12,973
Previous total stars rank12,957
Total stars rank change-16
CountryUSA
README summary

News It's been two months and I think I've finally discovered the **True** reasons why Simsiam/BYOL avoids collapsed solutions using stop gradient and predictor! SimSiam A PyTorch implementation for the paper **Exploring Simple Siamese Representation Learning** by Xinlei Chen & Kaiming He Dependencies If you don't have python 3 environment: Then install the required packages: Run SimSiam The data folder should look like this: To evaluate separately: and will save you the trouble of entering the folder name every single

time!

Frequently asked questions

How many stars and forks are recorded?

PatrickHua/SimSiam has 827 stars and 134 forks.

What is the repository rank?

PatrickHua/SimSiam is ranked 13,414.

What language and category are recorded?

PatrickHua/SimSiam has 827 stars, uses Python and belongs to Model Development.

Which repository is closest in rank?

PatrickHua/SimSiam is compared with SMILELab-FL/FedLab, ranked 13,415 with 827 stars.

README

News

It's been two months and I think I've finally discovered the True reasons why Simsiam/BYOL avoids collapsed solutions using stop gradient and predictor!!! Follow me on twitter and stay tuned!

SimSiam

A PyTorch implementation for the paper Exploring Simple Siamese Representation Learning by Xinlei Chen & Kaiming He

Dependencies

If you don't have python 3 environment:

conda create -n simsiam python=3.8
conda activate simsiam

Then install the required packages:

pip install -r requirements.txt

Run SimSiam

CUDA_VISIBLE_DEVICES=0 python main.py --data_dir ../Data/ --log_dir ../logs/ -c configs/simsiam_cifar.yaml --ckpt_dir ~/.cache/ --hide_progress

The data folder ../Data/ should look like this:

➜  ~ tree ../Data/
├── cifar-10-batches-py
│   ├── batches.meta
│   ├── data_batch_1
│   ├── ...
└── stl10_binary
    ├── ...
Training: 100%|#################################################################| 800/800 [11:46:06<00:00, 52.96s/it, epoch=799, accuracy=90.3]
Model saved to /root/.cache/simsiam-cifar10-experiment-resnet18_cifar_variant1.pth
Evaluating: 100%|##########################################################################################################| 100/100 [08:29<00:00,  5.10s/it]
Accuracy = 90.83
Log file has been saved to ../logs/completed-simsiam-cifar10-experiment-resnet18_cifar_variant1(2)

To evaluate separately:

CUDA_VISIBLE_DEVICES=4 python linear_eval.py --data_dir ../Data/ --log_dir ../logs/ -c configs/simsiam_cifar_eval.yaml --ckpt_dir ~/.cache/ --hide_progress --eval_from ~/simsiam-cifar10-experiment-resnet18_cifar_variant1.pth

creating file ../logs/in-progress_0111061045_simsiam-cifar10-experiment-resnet18_cifar_variant1
Evaluating: 100%|##########################################################################################################| 200/200 [16:52<00:00,  5.06s/it]
Accuracy = 90.87

export DATA="/path/to/your/datasets/" and export LOG="/path/to/your/log/" will save you the trouble of entering the folder name every single time!

Run SimCLR

CUDA_VISIBLE_DEVICES=1 python main.py --data_dir ../Data/ --log_dir ../logs/ -c configs/simclr_cifar.yaml --ckpt_dir ~/.cache/ --hide_progress

Run BYOL

CUDA_VISIBLE_DEVICES=2 python main.py --data_dir ../Data/ --log_dir ../logs/ -c configs/byol_cifar.yaml --ckpt_dir ~/.cache/ --hide_progress

TODO

  • convert from data-parallel (DP) to distributed data-parallel (DDP)
  • create PyPI package pip install simsiam-pytorch

If you find this repo helpful, please consider star so that I have the motivation to improve it.

Nearby in the ranking
Similar items