GithubHelp home page GithubHelp logo

dooooki / simclr Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mdiephuis/simclr

0.0 0.0 0.0 875 KB

Pytorch implementation of "A Simple Framework for Contrastive Learning of Visual Representations"

License: MIT License

Python 100.00%

simclr's Introduction

SimCLR

Pytorch implementation of the paper A Simple Framework for Contrastive Learning of Visual Representations

  • ADAM optimizer
  • ExponentialLR schedular. No warmup or other exotics
  • Batchsize of 256 via gradient accumulation

Feature model

  • Resnet50, where the first convolutional layer has a filter size of 3 instead of 7.
  • h() feature dimensionality: 2048
  • z() learning head output dimensionality: 128

Classifier model

  • Simple 1 layer Neural network from 2048 to num_classes

Classification Results

Epochs 100 200
Paper 83.9 89.2
This repo 87.49 88.16

Run

Train the feature extracting model (resnet). Note CIFAR10C inherits from datasets.CIFAR and provides the augmented image pairs.

python train_features.py --batch-size=64 --accumulation-steps=4 --tau=0.5 
                          --feature-size=128 --dataset-name=CIFAR10C --data-dir=path/to/your/data

Train the classifier model. Needs a saved feature model to extract features from images.

python train_classifier.py --load-model=models/modelname_timestamp.pt --dataset-name=CIFAR10 
                          --data-dir=path/to/your/data

simclr's People

Contributors

mdiephuis avatar shidilrzf avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.