Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SimSiam training guide for KerasCV #1079

Merged
merged 11 commits into from
Jan 25, 2023
Merged

Conversation

LukeWood
Copy link
Contributor

No description provided.

Comment on lines 17 to 39
## Background

Self-supervised learning is an approach to pre-training models using unlabeled data. T
his approach drastically increases accuracy when you have very few labeled examples but
a lot of unlabelled data.
The key insight is that you can train a self-supervised model to learn data
representations by contrasting multiple augmented views of the same example.
These learned representations capture data invariants, e.g., object translation, color
jitter, noise, etc. Training a simple linear classifier on top of the frozen
representations is easier and requires fewer labels because the pre-trained model
already produces meaningful and generally useful features.

Overall, self-supervised pre-training learns representations which are more generic and
robust than other approaches to augmented training and pre-training. An overview of
the general contrastive learning process is shown below:

![Contrastive overview](https://i.imgur.com/mzaEq3C.png)

In this tutorial, we will use the [SimSiam](https://arxiv.org/abs/2011.10566) algorithm
for contrastive learning. As of 2022, SimSiam is the state of the art algorithm for
contrastive learning; allowing for unprecedented scores on CIFAR-100 and other datasets.

To get started, we will sort out some imports.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a couple of tutorials on the topic of SSL on keras.io. May be refer the readers to some of them?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do this in the conclusion at the bottom

Copy link
Contributor

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing example!

@LukeWood
Copy link
Contributor Author

@owenvallis

@LukeWood
Copy link
Contributor Author

@ianstenbit @owenvallis @fchollet I did another pass on this and think its almost ready.

Let me know if you guys see any other issues!

Copy link
Contributor

@ianstenbit ianstenbit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG -- thanks Luke!

@LukeWood
Copy link
Contributor Author

ok @fchollet this should be ready

Copy link
Contributor

@fchollet fchollet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM -- thank you! A few minor nits only.

@LukeWood LukeWood requested review from fchollet and removed request for owenvallis January 22, 2023 17:20
@LukeWood
Copy link
Contributor Author

@fchollet addressed - will begin a run to generate the genfiles.

@fchollet
Copy link
Contributor

Sounds good -- thank you!

@LukeWood
Copy link
Contributor Author

@fchollet should be ready for final merge.

@fchollet fchollet merged commit 3037412 into keras-team:master Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants