Skip to content

Repository files navigation

SimSiam-TF

This is an unofficial implementation of SimSiam (Exploring Simple Siamese Representation Learning, CVPR 2021.).

Requirements

  • python >= 3.6
  • tensorflow >= 2.2

Training

To train SimSiam,

python main.py \
--task pretext \
--stop_gradient \
--proj_bn_hidden \
--proj_bn_output \
--pred_bn_hidden \
--weight_decay 0.0001 \
--batch_size 256 \
--epochs 200 \
--lr_mode cosine \
--data_path /path/of/your/data \
--gpus gpu id(s) which will be used

Evaluation

To evaluate pre-trained model with linear classification,

python main.py \
--task lincls \
--batch_size 256 \
--epochs 90 \
--lr 30 \
--lr_mode cosine \
--data_path /path/of/your/data \
--snapshot /path/of/checkpoint \
--gpus gpu id(s) which will be used

Results

ImageNet

ModelbatchAccuracy (paper)Accuracy (ours)
ResNet50 (200 epochs)25668.1-

CIFAR10

ModelbatchAccuracy (paper)Accuracy (ours)
ResNet50 (800 epochs)25691.190.7

Citation

@article{Chen2020ExploringSS,
title={Exploring Simple Siamese Representation Learning},
author={Xinlei Chen and Kaiming He},
journal={ArXiv},
year={2020},
volume={abs/2011.10566}
}

About

TF 2.x implementation of SimSiam (Exploring Simple Siamese Representation Learning, CVPR 2021)

Topics

Resources

Stars

16 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages