-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: ImaGonEs <[email protected]>
- Loading branch information
Showing
11 changed files
with
987 additions
and
0 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
All4One | ||
====== | ||
|
||
.. automethod:: solo.methods.all4one.All4One.__init__ | ||
:noindex: | ||
|
||
|
||
add_model_specific_args | ||
~~~~~~~~~~~~~~~~~~~~~~~ | ||
.. automethod:: solo.methods.all4one.All4One.add_model_specific_args | ||
:noindex: | ||
|
||
learnable_params | ||
~~~~~~~~~~~~~~~~ | ||
.. autoattribute:: solo.methods.all4one.All4One.learnable_params | ||
:noindex: | ||
|
||
dequeue_and_enqueue | ||
~~~~~~~~~~~~~~~~~~~ | ||
.. automethod:: solo.methods.all4one.All4One.dequeue_and_enqueue | ||
:noindex: | ||
|
||
find_nn | ||
~~~~~~~~~~~~~~~~~~~~ | ||
.. automethod:: solo.methods.all4one.All4One.find_nn | ||
:noindex: | ||
|
||
off_diagonal | ||
~~~~~~~~~~~~~~~~~~~~ | ||
.. automethod:: solo.methods.all4one.All4One.off_diagonal | ||
:noindex: | ||
|
||
|
||
save_NN | ||
~~~~~~~~~~~~~~~~~~~~ | ||
.. automethod:: solo.methods.all4one.All4One.save_NN | ||
:noindex: | ||
|
||
|
||
forward | ||
~~~~~~~ | ||
.. automethod:: solo.methods.all4one.All4One.forward | ||
:noindex: | ||
|
||
training_step | ||
~~~~~~~~~~~~~ | ||
.. automethod:: solo.methods.all4one.All4One.training_step | ||
:noindex: |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
defaults: | ||
- _self_ | ||
- augmentations: asymmetric.yaml | ||
- wandb: private.yaml | ||
- override hydra/hydra_logging: disabled | ||
- override hydra/job_logging: disabled | ||
|
||
# disable hydra outputs | ||
hydra: | ||
output_subdir: null | ||
run: | ||
dir: . | ||
|
||
name: "All4One-cifar100" # change here for cifar10 | ||
method: "all4one" | ||
backbone: | ||
name: "resnet18" | ||
method_kwargs: | ||
temperature: 0.2 | ||
proj_hidden_dim: 2048 | ||
pred_hidden_dim: 4096 | ||
proj_output_dim: 256 | ||
queue_size: 98304 | ||
momentum: | ||
base_tau: 0.99 | ||
final_tau: 1.0 | ||
data: | ||
dataset: cifar100 # change here for cifar10 | ||
train_path: "./datasets/" | ||
val_path: "./datasets/" | ||
format: "image_folder" | ||
num_workers: 4 | ||
optimizer: | ||
name: "lars" | ||
batch_size: 256 | ||
lr: 1.0 | ||
classifier_lr: 0.1 | ||
weight_decay: 1e-5 | ||
kwargs: | ||
clip_lr: True | ||
eta: 0.02 | ||
exclude_bias_n_norm: True | ||
scheduler: | ||
name: "warmup_cosine" | ||
checkpoint: | ||
enabled: True | ||
dir: "trained_models" | ||
frequency: 1 | ||
auto_resume: | ||
enabled: False | ||
|
||
# overwrite PL stuff | ||
max_epochs: 1000 | ||
devices: [0] | ||
sync_batchnorm: True | ||
accelerator: "gpu" | ||
strategy: "ddp" | ||
precision: 16-mixed |
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,55 @@ | ||
defaults: | ||
- _self_ | ||
- augmentations: asymmetric.yaml | ||
- wandb: private.yaml | ||
- override hydra/hydra_logging: disabled | ||
- override hydra/job_logging: disabled | ||
|
||
# disable hydra outputs | ||
hydra: | ||
output_subdir: null | ||
run: | ||
dir: . | ||
|
||
name: "all4one-imagenet100" | ||
method: "all4one" | ||
backbone: | ||
name: "resnet18" | ||
method_kwargs: | ||
temperature: 0.2 | ||
proj_hidden_dim: 2048 | ||
pred_hidden_dim: 4096 | ||
proj_output_dim: 256 | ||
queue_size: 98340 | ||
data: | ||
dataset: imagenet100 | ||
train_path: "./datasets/imagenet-100/train" | ||
val_path: "./datasets/imagenet-100/val" | ||
format: "dali" | ||
num_workers: 4 | ||
optimizer: | ||
name: "lars" | ||
batch_size: 128 | ||
lr: 1.0 | ||
classifier_lr: 0.1 | ||
weight_decay: 1e-5 | ||
kwargs: | ||
clip_lr: True | ||
eta: 0.02 | ||
exclude_bias_n_norm: True | ||
scheduler: | ||
name: "warmup_cosine" | ||
checkpoint: | ||
enabled: True | ||
dir: "trained_models" | ||
frequency: 1 | ||
auto_resume: | ||
enabled: True | ||
|
||
# overwrite PL stuff | ||
max_epochs: 400 | ||
devices: [0, 1] | ||
sync_batchnorm: True | ||
accelerator: "gpu" | ||
strategy: "ddp" | ||
precision: 16-mixed |
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.