← 开源
facebookresearch

vicreg

VICReg official code base

Model DevelopmentArchitecturePython
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
577
Star
92
Fork
+0
本周
1
贡献者
创建于 2022-02-28 · 更新于 2026-07-23 · 今日第 16692 名
主要开发者
Adrien987k

facebookresearch/vicreg 排名第 16,692,有 577 个星标。

同类别比较

facebookresearch/vicreg 排名第 16,692,此处有 8 个同类条目;floodsung/DDPG 排名第 16,693。

同类别比较
名称排名指标
Bartzi/see16,685
语言:
Python
星标数:
577
分叉数:
146
简介:
Code for the AAAI 2018 publication "SEE: Towards Semi-Supervised End-to-End Scene Text Recognition"
Mostafa-Samir/DNC-tensorflow16,688
语言:
Jupyter Notebook
星标数:
577
分叉数:
161
简介:
A TensorFlow implementation of DeepMind's Differential Neural Computers (DNC)
Scalsol/mega.pytorch16,689
语言:
Python
星标数:
577
分叉数:
121
简介:
Memory Enhanced Global-Local Aggregation for Video Object Detection, CVPR2020
benmoseley/FBPINNs16,690
语言:
Python
星标数:
577
分叉数:
117
简介:
Solve forward and inverse problems related to partial differential equations using finite basis physics-informed neural networks (FBPINNs)
floodsung/DDPG16,693
语言:
Python
星标数:
577
分叉数:
177
简介:
Reimplementation of DDPG(Continuous Control with Deep Reinforcement Learning) based on OpenAI Gym + Tensorflow
huggingface/cosmopedia16,694
语言:
Python
星标数:
577
分叉数:
49
minosvasilias/godot-dodo16,698
语言:
Python
星标数:
577
分叉数:
28
简介:
Finetuning large language models for GDScript generation.
salesforce/CodeRL16,700
语言:
Python
星标数:
577
分叉数:
69
简介:
This is the official code for the paper CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learning (NeurIPS22).
关键参数与规格
关键参数与规格
参数值
语言Python
类别Model Development
子类别Architecture
星标数577
分叉数92
贡献者1
创建日期2022-02-28
更新日期2026-07-23
1 天星标数0
7 天星标数0
排名16,692
上次排名16,479
排名变化-213
7 天星标排名15,669
上次 7 天星标排名15,674
7 天星标排名变化5
总星标排名17,304
上次总星标排名17,274
总星标排名变化-30
国家USA
README 摘录

Pretrained models on PyTorch Hub Training Install PyTorch (pytorch. The code has been developed for PyTorch version 1. 1, but should work with other versions just as well. Single-node local training To pretrain VICReg with ResNet-50 on a single node with 8 GPUs for 100 epochs, run: Multi-node training with SLURM To pretrain VICReg with submitit ( ) and SLURM on 4 nodes with 8 GPUs each for 1000 epochs, run: Evaluation Linear evaluation To evaluate a pretrained ResNet

-50 backbone on linear classification on ImageNet, run: Semi-supervised evaluation To evaluate a pretrained ResNet50-model on semi-supervised fine-tunning on 1% of ImageNet labels, run: To evaluate a pretrained ResNet50-model on semi-supervised fine-tunning on 10% of ImageNet labels, run: Acknowledgement This repository is built using the Barlow Twins repository. License This project is released under MIT License, which allows commercial use. Citation If you find this repository useful, please consider giving a star :star

: and citation:

常见问题

记录了多少星标和分叉?

facebookresearch/vicreg 有 577 个星标和 92 个分叉。

仓库排名是多少?

facebookresearch/vicreg 排名第 16,692。

记录的语言和类别是什么?

facebookresearch/vicreg 有 577 个星标,语言为 Python,类别为 Model Development。

哪个仓库排名最接近?

facebookresearch/vicreg 与 floodsung/DDPG 比较,后者排名第 16,693,有 577 个星标。

README

VICReg: Variance-Invariance-Covariance Regularization For Self-Supervised Learning

This repository provides a PyTorch implementation and pretrained models for VICReg, as described in the paper VICReg: Variance-Invariance-Covariance Regularization For Self-Supervised Learning
Adrien Bardes, Jean Ponce and Yann LeCun
Meta AI, Inria


Pre-trained Models

You can choose to download only the weights of the pretrained backbone used for downstream tasks, or the full checkpoint which contains backbone and projection head weights.

arch

params

accuracy

download

ResNet-50

23M

73.2%

backbone only

full ckpt

ResNet-50 (x2)

93M

75.5%

backbone only

full ckpt

ResNet-200 (x2)

250M

77.3%

backbone only

full ckpt

Pretrained models on PyTorch Hub

import torch
resnet50 = torch.hub.load('facebookresearch/vicreg:main', 'resnet50')
resnet50x2 = torch.hub.load('facebookresearch/vicreg:main', 'resnet50x2')
resnet200x2 = torch.hub.load('facebookresearch/vicreg:main', 'resnet200x2')

Training

Install PyTorch (pytorch.org) and download ImageNet. The code has been developed for PyTorch version 1.8.1 and torchvision version 0.9.1, but should work with other versions just as well.

Single-node local training

To pretrain VICReg with ResNet-50 on a single node with 8 GPUs for 100 epochs, run:

python -m torch.distributed.launch --nproc_per_node=8 main_vicreg.py --data-dir /path/to/imagenet/ --exp-dir /path/to/experiment/ --arch resnet50 --epochs 100 --batch-size 512 --base-lr 0.3

Multi-node training with SLURM

To pretrain VICReg with submitit (pip install submitit) and SLURM on 4 nodes with 8 GPUs each for 1000 epochs, run:

python run_with_submitit.py --nodes 4 --ngpus 8 --data-dir /path/to/imagenet --exp-dir /path/to/experiment/ --arch resnet50 --epochs 1000 --batch-size 2048 --base-lr 0.2

Evaluation

Linear evaluation

To evaluate a pretrained ResNet-50 backbone on linear classification on ImageNet, run:

python evaluate.py --data-dir /path/to/imagenet/ --pretrained /path/to/checkpoint/resnet50.pth --exp-dir /path/to/experiment/ --lr-head 0.02

Semi-supervised evaluation

To evaluate a pretrained ResNet50-model on semi-supervised fine-tunning on 1% of ImageNet labels, run:

python evaluate.py --data-dir /path/to/imagenet/ --pretrained /path/to/checkpoint/resnet50.pth --exp-dir /path/to/experiment/ --weights finetune --train-perc 1 --epochs 20 --lr-backbone 0.03 --lr-classifier 0.08 --weight-decay 0

To evaluate a pretrained ResNet50-model on semi-supervised fine-tunning on 10% of ImageNet labels, run:

python evaluate.py --data-dir /path/to/imagenet/ --pretrained /path/to/checkpoint/resnet50.pth --exp-dir /path/to/checkpoint/resnet.pth --weights finetune --train-perc 10 --epochs 20 --lr-backbone 0.01 --lr-classifier 0.1 --weight-decay 0

Acknowledgement

This repository is built using the Barlow Twins repository.

License

This project is released under MIT License, which allows commercial use. See LICENSE for details.

Citation

If you find this repository useful, please consider giving a star :star: and citation:

@inproceedings{bardes2022vicreg,
  author  = {Adrien Bardes and Jean Ponce and Yann LeCun},
  title   = {VICReg: Variance-Invariance-Covariance Regularization For Self-Supervised Learning},
  booktitle = {ICLR},
  year    = {2022},
}
排名相邻
同类项目