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

Adding an example for Supervised Contrastive Learning #283

Merged
merged 22 commits into from
Dec 2, 2020
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
12b033a
Adding an example for Supervised Contrastive Learning
ksalama Oct 18, 2020
00b211a
Removing the notebook and the md files
ksalama Oct 19, 2020
0616833
Update supervised-contrastive-learning.py
ksalama Oct 21, 2020
1a55186
Update supervised-contrastive-learning.py
ksalama Oct 26, 2020
e213499
Update supervised-contrastive-learning.py
ksalama Nov 12, 2020
4899b26
Formatting fixes
fchollet Nov 14, 2020
bc1e59f
Update supervised-contrastive-learning.py
ksalama Nov 20, 2020
2dcea87
Update supervised-contrastive-learning.py
ksalama Nov 20, 2020
4470490
Update supervised-contrastive-learning.py
ksalama Nov 21, 2020
b88380d
Update supervised-contrastive-learning.py
ksalama Nov 21, 2020
0bc6a51
Update supervised-contrastive-learning.py
ksalama Nov 21, 2020
3bc0334
Update supervised-contrastive-learning.py
ksalama Nov 21, 2020
2bde23a
Update supervised-contrastive-learning.py
ksalama Nov 21, 2020
4324445
Update supervised-contrastive-learning.py
ksalama Nov 26, 2020
ab8a4cb
Update supervised-contrastive-learning.py
ksalama Nov 26, 2020
872714f
Update supervised-contrastive-learning.py
ksalama Nov 26, 2020
394fccc
Update supervised-contrastive-learning.py
ksalama Nov 28, 2020
65ebb3e
Format code file using black tool
ksalama Nov 28, 2020
d787ef2
Update supervised-contrastive-learning.py
ksalama Nov 30, 2020
1b05825
Fix typos
ksalama Nov 30, 2020
8b0a692
Update supervised-contrastive-learning.py
ksalama Dec 1, 2020
b61bad2
Add the generated .md and .ipynb files
ksalama Dec 1, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update supervised-contrastive-learning.py
  • Loading branch information
ksalama committed Nov 26, 2020
commit 872714faeb56e94318d19c3e0c4ef30c1f5131f7
3 changes: 2 additions & 1 deletion examples/vision/supervised-contrastive-learning.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ def create_encoder():
pooling='avg')

inputs = keras.Input(shape=input_shape)
outputs = densenet(inputs)
augmented = data_augmentation(inputs)
outputs = resnet(augmented)
model = keras.Model(inputs=inputs, outputs=outputs, name="cifar10-encoder")
ksalama marked this conversation as resolved.
Show resolved Hide resolved
return model

Expand Down