GitXplorerGitXplorer
h

pytorch-ssl

public
2 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
165db73255cf780669c6ec9a40ad936b97e211dd

docs: update validation tutorial

hhankyul2 committed 2 years ago
Unverified
03c3d5b9a55641ea9b5619472d276a8206884df7

feat: multi & single gpu evaluation for fc & knn classifier

hhankyul2 committed 2 years ago
Unverified
a472a44839caf38aa3021d6af6817159f45861be

feat: dataset related utilities

hhankyul2 committed 2 years ago
Unverified
878ab1e367ba0651f96eac2cb843cc9d8ebe1a3b

feat: validation structure

hhankyul2 committed 2 years ago
Unverified
70ce9fd63c71a24b18bad873f68b5d58d0a29c62

feat: add gumbel-softmax based vae on mnist dataset.

hhankyul2 committed 2 years ago
Unverified
ab8000d6b4972fc7c05eb7385600765f8517d170

chore: remove test folders

hhankyul2 committed 2 years ago

README

The README file for this repository.

Pytorch-SSL

This is pytorch-self-supervised-learning repository.

Table of contents:

  1. tutorial
  2. experimental result

Tutorial

1. how to pre-train your model

  1. clone this repo.

    git clone https://github.com/hankyul2/pytorch-ssl.git
    cd pytorch-ssl
    pip3 install requirements.txt 
  2. run following command.

2. how to fine-tune your model

  1. run following command.

3. how to validate your model

  1. run following command.

    KNN classifier

    # Single-GPU
    python3 valid.py -es imagenet1k_knn_224_v1 -ws dino_official
    # Multi-GPU 
    torchrun --nproc_per_node=4 --master_port=12345 valid.py -es imagenet1k_knn_224_v1 -ws dino_official

    FC classifier

    # Single-GPU
    python3 valid.py -es imagenet1k_fc_224_v1 -ws dino_official
    # Multi-GPU 
    torchrun --nproc_per_node=4 --master_port=12345 valid.py -es imagenet1k_fc_224_v1 -ws dino_official

    Tips

    1. For large sized train dataset, we recommend to run multi-gpu command because, extracting whole features takes too much time in single gpu.
    2. If you have extracted features once, please specify the extracted feature path at feature_path in config/valid.json.
    3. If you don't specify weight settings (-ws), whole weight settings will be used in validation.
    4. If you don't specify model name (-m), whole model in model_weight will be used in validation.