-
-
Notifications
You must be signed in to change notification settings - Fork 388
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dockerfile for self-supervised examples (#1322)
* feat: Dockerfile for self-supervised examples * added .dockerignore * docs: Update README and learning_rate * docs: update README * docs: Update README * Update README.md * Update README.md * added structure * docs: added header in README * fix: put get_loaders in common * feat: get_loaders in common * refactor: barlow twins * refactor: byol example * feat: added get_contrastive_model * refactor: simCLR * refactor: supervised contrastive * style: 🎨 * style: 🎨 * docs: added docs to common functions * fix: added ml dependency * docs: update README * fix: use unpacked args for get_contrastive_model * fix: us unpacked paramets for get_loaders * style: 🎨
- Loading branch information
Showing
8 changed files
with
136 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Exclude everything: | ||
* | ||
# Include useful: | ||
!barlow_twins.py | ||
!byol.py | ||
!common.py | ||
!datasets.py | ||
!simCLR.py | ||
!supervised_contrastive.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM python:3.8 | ||
|
||
RUN pip install catalyst[cv]==21.09 | ||
RUN pip install catalyst[ml]==21.09 | ||
|
||
COPY . . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Self-Supervised Learning Examples | ||
## Description | ||
|
||
All traing files have common command line parametrs: | ||
|
||
--feature_dim - Feature dim for latent vector | ||
--temperature - Temperature used in softmax | ||
--batch_size - Number of images in each mini-batch | ||
--epochs - Number of sweeps over the dataset to train | ||
--num_workers - Number of workers to process a dataloader | ||
--logdir - Logs directory (tensorboard, weights, etc) | ||
--dataset - Dataset: CIFAR-10, CIFAR-100 or STL10 | ||
--learning_rate - Learning rate for optimizer | ||
|
||
### Extra parametrs | ||
|
||
Barlow-twins (barlow_twins.py) has an extra parametr ``--offdig_lambda`` - lambda that controls the on- and off-diagonal terms from Barlow twins loss. | ||
|
||
## Usage | ||
|
||
``` | ||
docker build . -t train-self-supervised | ||
docker run train-self-supervised python3 simCLR.py --batch_size 32 | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.