Implement Barlow Twins #229
Comments
I would be glad to work on this if you want. |
EDIT: We are checking with the authors if they planned to provide an implementation themselves! I'll update here if authors plan to do it in which case I'd recommend to wait. We will communicate the plan. Hi @OlivierDehaene , the proposal looks great and we would love to have this in VISSL. Go ahead :) Also take a look at |
You could use the code here: https://github.com/IgorSusmelj/barlowtwins |
Hi Oliver, paper author here. Thanks for volunteering to implement Barlow Twins in VISSL! Please go ahead with the implementation. Also, the official code should be out next week. We are making final tweaks to the codebase. Best, |
Hello Jure, Cool! I think I'll wait for the code to come out before continuing as I'm not really sure about the value of some hyper-parameters. Nice paper by the way :) Cheers |
@jzbontar , it it possible to share the hyperparams setup in @OlivierDehaene 's PR? :) |
I also think that waiting for us to release to code would make sense so that the VISSL implementation and our official implementation match. Like I said, you can expect us to release the code sometime next week. Out of curiosity, which hyper-parameters are you unsure about? |
@jzbontar I only have questions regarding the optimization hyper-parameters:
The first can be inferred from the "We follow the optimization protocol described in BYOL" sentence but I would prefer to be sure :) |
def adjust_learning_rate(args, optimizer, loader, step):
max_steps = args.epochs * len(loader)
warmup_steps = 10 * len(loader)
base_lr = args.learning_rate * args.batch_size / 256
if step < warmup_steps:
lr = base_lr * step / warmup_steps
else:
step -= warmup_steps
max_steps -= warmup_steps
q = 0.5 * (1 + math.cos(math.pi * step / max_steps))
end_lr = base_lr * 0.001
lr = base_lr * q + end_lr * (1 - q)
for param_group in optimizer.param_groups:
param_group['lr'] = lr
return lr
|
We released the code for Barlow Twins. |
Summary: ## Required (TBC) - [X] BarlowTwinsLoss and Criterion - [x] Documentation - [X] Loss - [x] SSL Approaches + Index - [x] Model Zoo - [x] Project - [x] Default configs - [x] pretrain - [X] test/integration - [X] debugging/pretrain - [x] Benchmarks - [x] ImageNet: 70.75 for 300 epochs - [x] Imagenette 160: 88.8 Top1 accuracy closes #229 Pull Request resolved: #230 Reviewed By: iseessel Differential Revision: D28118605 Pulled By: prigoyal fbshipit-source-id: 4436d6fd9d115b80ef5c5396318caa3cb26faadb
Summary: Pull Request resolved: fairinternal/ssl_scaling#229 Reviewed By: iseessel Differential Revision: D34690454 Pulled By: QuentinDuval fbshipit-source-id: 6faf1e7ffcef28b4cd8feba6fc0f3434901810dc
馃専 New SSL approach addition
Approach description
Implement Barlow Twins (arxiv link).
Pseudocode:
Open source status
The model implementation is not yet available. However, it will be open sourced at: https://github.com/facebookresearch/barlowtwins
The text was updated successfully, but these errors were encountered: