TensorFlow port of PyTorch Image Models (timm) - image models with pretrained weights.

Overview

TensorFlow-Image-Models

Introduction

TensorfFlow-Image-Models (tfimm) is a collection of image models with pretrained weights, obtained by porting architectures from timm to TensorFlow. The hope is that the number of available architectures will grow over time. For now, it contains vision transformers (ViT, DeiT and Swin Transformers) and ResNets.

This work would not have been possible wihout Ross Wightman's timm library and the work on PyTorch/TensorFlow interoperability in HuggingFace's transformer repository. I tried to make sure all source material is acknowledged. Please let me know if I have missed something.

Usage

Installation

The package can be installed via pip,

pip install tfimm

To load pretrained weights, timm needs to be installed. This is an optional dependency and can be installed via

pip install tfimm[timm]

Creating models

To load pretrained models use

import tfimm

model = tfimm.create_model("vit_tiny_patch16_224", pretrained="timm")

We can list available models with pretrained weights via

import tfimm

print(tfimm.list_models(pretrained="timm"))

Most models are pretrained on ImageNet or ImageNet-21k. If we want to use them for other tasks we need to change the number of classes in the classifier or remove the classifier altogether. We can do this by setting the nb_classes parameter in create_model. If nb_classes=0, the model will have no classification layer. If nb_classes is set to a value different from the default model config, the classification layer will be randomly initialized, while all other weights will be copied from the pretrained model.

The preprocessing function for each model can be created via

import tensorflow as tf
import tfimm

preprocess = tfimm.create_preprocessing("vit_tiny_patch16_224", dtype="float32")
img = tf.ones((1, 224, 224, 3), dtype="uint8")
img_preprocessed = preprocess(img)

Saving and loading models

All models are subclassed from tf.keras.Model (they are not functional models). They can still be saved and loaded using the SavedModel format.

>> type(model) >>> model.save("/tmp/my_model") >>> loaded_model = tf.keras.models.load_model("/tmp/my_model") >>> type(loaded_model) ">
>>> import tesnorflow as tf
>>> import tfimm
>>> model = tfimm.create_model("vit_tiny_patch16_224")
>>> type(model)

     
      
>>> model.save("/tmp/my_model")
>>> loaded_model = tf.keras.models.load_model("/tmp/my_model")
>>> type(loaded_model)

      

      
     

For this to work, the tfimm library needs to be imported before the model is loaded, since during the import process, tfimm is registering custom models with Keras. Otherwise, we obtain the following output

>> type(loaded_model) ViT'> ">
>>> import tensorflow as tf
>>> loaded_model = tf.keras.models.load_model("/tmp/my_model")
>>> type(loaded_model)

    
     ViT'>

    

Models

The following architectures are currently available:

Profiling

To understand how big each of the models is, I have done some profiling to measure

  • maximum batch size that fits in GPU memory and
  • throughput in images/second for both inference and backpropagation on K80 and V100 GPUs. For V100, measurements were done for both float32 and mixed precision.

The results can be found in the results/profiling_{k80, v100}.csv files.

For backpropagation, we use as loss the mean of model outputs

def backprop():
    with tf.GradientTape() as tape:
        output = model(x, training=True)
        loss = tf.reduce_mean(output)
        grads = tape.gradient(loss, model.trainable_variables)
    optimizer.apply_gradients(zip(grads, model.trainable_variables))

License

This repository is released under the Apache 2.0 license as found in the LICENSE file.

Comments
  • Call new layer on the last layer of create_model object using Functional API

    Call new layer on the last layer of create_model object using Functional API

    Hi. First, I want to say that I enjoy this library a lot! Thank you @martinsbruveris for creating it!

    I have a question: I want create a model body using create_model function and add my own classification head. In classification head I want to add another input layer to additional features, call a concatenate layer on last layer of the create_model object and new input layer, and add final dense layer. Since create_model object is not a Sequential or Functional model object, is there any way I can do that? I tried using 'model_tfimm.output' or 'model_tfimm.layers[-1].output' calls, because .output call works with Tensorflow models, but it does not seem to work with tfimm models:

    dense_1 = tf.keras.layers.Dense(512, activation='relu', name='dense_1')(model_tfimm.layers[-1].output)
    
    ---------------------------------------------------------------------------
    AttributeError                            Traceback (most recent call last)
    v:\Git\spellbook\magicClassification.py in <module>
    ----> 1 dense_1 = tf.keras.layers.Dense(512, activation='relu', name='dense_1')(model_tfimm.layers[-1].output)
    
    ~\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\engine\base_layer.py in output(self)
      2094     """
      2095     if not self._inbound_nodes:
    -> 2096       raise AttributeError('Layer ' + self.name + ' has no inbound nodes.')
      2097     return self._get_node_attribute_at_index(0, 'output_tensors', 'output')
      2098 
    
    AttributeError: Layer activation_72 has no inbound nodes.
    
    model_tfimm.output
    
    ---------------------------------------------------------------------------
    AttributeError                            Traceback (most recent call last)
    v:\Git\spellbook\magicClassification.py in <module>
    ----> 1 model_tfimm.output
    
    ~\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\engine\base_layer.py in output(self)
       2094     """
       2095     if not self._inbound_nodes:
    -> 2096       raise AttributeError('Layer ' + self.name + ' has no inbound nodes.')
       2097     return self._get_node_attribute_at_index(0, 'output_tensors', 'output')
       2098 
    
    AttributeError: Layer conv_ne_xt_1 has no inbound nodes.
    

    Using Tensorflow Functional API this would like something like this:

    model_tfimm = tfimm.create_model(TFIMM_MODEL_NAME, nb_classes=0, pretrained="timm")
    feature_extractor = model_tfimm.output
    
    add_input = tf.keras.layers.Input(shape=(NUM_ADD_FEATURES, ), name='input_features_layer')
    concat_layer = tf.keras.layers.Concatenate(name='concat_features')([feature_extractor, add_input])
    
    predictions = tf.keras.layers.Dense(NUM_CLASSES, activation=OUTPUT_ACTIVATION)(concat_layer)
    
    model = tf.keras.Model(inputs=[model_tfimm.input, add_input], outputs=predictions)
    

    Any ideas?

    opened by ztsv-av 7
  • Just want to ask a question for education purposes... hope it's okay!

    Just want to ask a question for education purposes... hope it's okay!

    Hi, this library is great. I'm wondering, maybe you can tell me this with your experience, what would be your small-list of the "top" essentials of a state-of-art image model these days? Data augmentation of course (mixup?), regularization (layer norm?), EMA, weight decay... I want to get a minimalist competitive ImageNet model working.

    opened by slerman12 5
  • Error while importing tfimm library

    Error while importing tfimm library

    Problem:

    When I try to install and import tfimm packages:

    !pip install tfimm import tfimm

    This error occurs:

    ---------------------------------------------------------------------------
    RuntimeError                              Traceback (most recent call last)
    RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
    
    ---------------------------------------------------------------------------
    ImportError                               Traceback (most recent call last)
    /tmp/ipykernel_42/1172421075.py in <module>
          3 get_ipython().system('pip install timm')
          4 import timm
    ----> 5 import tfimm
    
    /opt/conda/lib/python3.7/site-packages/tfimm/__init__.py in <module>
    ----> 1 from . import architectures  # noqa: F401
          2 from .models.factory import create_model, create_preprocessing  # noqa: F401
          3 from .models.registry import list_models  # noqa: F401
          4 from .utils import (  # noqa: F401
          5     cached_model_path,
    
    /opt/conda/lib/python3.7/site-packages/tfimm/architectures/__init__.py in <module>
    ----> 1 from .cait import *  # noqa: F401
          2 from .convmixer import *  # noqa: F401
          3 from .convnext import *  # noqa: F401
          4 from .mlp_mixer import *  # noqa: F401
          5 from .pit import *  # noqa: F401
    
    /opt/conda/lib/python3.7/site-packages/tfimm/architectures/cait.py in <module>
         15 from typing import List, Tuple
         16 
    ---> 17 import tensorflow as tf
         18 
         19 from tfimm.layers import (
    
    /opt/conda/lib/python3.7/site-packages/tensorflow/__init__.py in <module>
         35 import typing as _typing
         36 
    ---> 37 from tensorflow.python.tools import module_util as _module_util
         38 from tensorflow.python.util.lazy_loader import LazyLoader as _LazyLoader
         39 
    
    /opt/conda/lib/python3.7/site-packages/tensorflow/python/__init__.py in <module>
         35 
         36 from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow
    ---> 37 from tensorflow.python.eager import context
         38 
         39 # pylint: enable=wildcard-import
    
    /opt/conda/lib/python3.7/site-packages/tensorflow/python/eager/context.py in <module>
         33 from tensorflow.python import pywrap_tfe
         34 from tensorflow.python import tf2
    ---> 35 from tensorflow.python.client import pywrap_tf_session
         36 from tensorflow.python.eager import executor
         37 from tensorflow.python.eager import monitoring
    
    /opt/conda/lib/python3.7/site-packages/tensorflow/python/client/pywrap_tf_session.py in <module>
         17 # pylint: disable=invalid-import-order,g-bad-import-order, wildcard-import, unused-import
         18 from tensorflow.python import pywrap_tensorflow
    ---> 19 from tensorflow.python.client._pywrap_tf_session import *
         20 from tensorflow.python.client._pywrap_tf_session import _TF_SetTarget
         21 from tensorflow.python.client._pywrap_tf_session import _TF_SetConfig
    
    ImportError: SystemError: <built-in method __contains__ of dict object at 0x7f9744ee7280> returned a result with an error set
    

    Desktop Environment:

    • OS: Xubuntu 20.04
    • Browser: Mozilla Firefox
    • Device: Cloud VMs Kaggle = TPU v3-8 Core
    • TF Latest Version with CUDA Latest Version
    • NumPy == 1.21.5

    Question

    In other repositories I have found that upgrading NumPy solves the problem. But my NumPy has the latest version. Can anyone please help me to solve this error?

    opened by iftiben10 5
  • Learning rate schedule is now a config class

    Learning rate schedule is now a config class

    To avoid to over parametrise the learning rate schedule class I propose to make them serializable objects. This is also related to https://github.com/martinsbruveris/tensorflow-image-models/discussions/38

    opened by hyenal 4
  • Incompatible shapes: [4] vs. [4,196] during finetuning ViT

    Incompatible shapes: [4] vs. [4,196] during finetuning ViT

    Hi, I was building a model using ViT by iterating through the layers, but got error Incompatible shapes: [4] vs. [4,196] when I call model.fit. Any ideas where the mismatch is happening? or it would be grateful if you guide me how to debug it (I am new to tensorflow). Here is the function for building a ViT model for finetuning.

    def get_model(img_size=config.IMAGE_SIZE):
        with strategy.scope():
            inp = tf.keras.layers.Input(shape = [img_size, img_size, 3], name = 'inp1')
            label = tf.keras.layers.Input(shape = (), name = 'inp2')
    
            vit_model = tfimm.create_model("vit_base_patch16_224_miil_in21k", pretrained="timm",nb_classes=0)
    
            x = inp
            for layer in vit_model.layers:
                x = layer(x)
    
                # Some modification will be made here playing with x
    
    
            x = tf.keras.layers.Dense(config.N_CLASSES)(x)
            output = tf.keras.layers.Softmax(dtype='float32')(x)
            model = tf.keras.models.Model(inputs = [inp, label], outputs = [output])
            
            opt = tf.keras.optimizers.Adam(learning_rate = config.LR)
    
            model.compile(
                optimizer = opt,
                loss = [tf.keras.losses.SparseCategoricalCrossentropy()],
                metrics = [tf.keras.metrics.SparseCategoricalAccuracy(),tf.keras.metrics.SparseTopKCategoricalAccuracy(k=5)]
            )
    
        return model
    
    opened by lorenzo-park 3
  • [FEATURE REQUEST] EfficientNet models

    [FEATURE REQUEST] EfficientNet models

    Is there any plan to add efficientnet V1x or V2x models ? I know implementations can be found in the keras module itself but adding these models would make this library trully the equivalent of ross's pytorch-image-models.

    opened by benihime91 2
  • Cannot install tfimm via pip

    Cannot install tfimm via pip

    Good day, I tried to install tfimm via pip but I got the following error.

    ERROR: Could not find a version that satisfies the requirement tfimm( from version: None) ERROR: No matching distribution found for tfimm

    Is that a problem because I have not installed another packages?

    opened by hailuu684 2
  • automatic sweep registration

    automatic sweep registration

    Remove the need for manually specifying whether we are using a W&B sweep or not. Also linked to this idea https://github.com/martinsbruveris/tensorflow-image-models/discussions/36

    opened by hyenal 2
  • Cannot load model with `create_model` function (potential conflict with keras)

    Cannot load model with `create_model` function (potential conflict with keras)

    Right now I am using my own copy of vit_base_patch32_224_in21k. I am trying to initialize the model using tfimm.create_model. I am trying to load the model using the following:

    import tfimm
    tfimm.create_model(model_name='vit_base_patch32_224_in21k', model_path ='/my/model/path/vit_base_patch32_224_in21k/', input_shape=(224,224))
    

    This results in

      File "/etc/pyenv/versions/3.8.6/lib/python3.8/site-packages/tfimm/models/factory.py", line 45, in create_model
        loaded_model = tf.keras.models.load_model(model_path)
      File "/etc/pyenv/versions/3.8.6/lib/python3.8/site-packages/keras/utils/traceback_utils.py", line 67, in error_handler
        raise e.with_traceback(filtered_tb) from None
      File "/etc/pyenv/versions/3.8.6/lib/python3.8/site-packages/tfimm/models/serialization.py", line 81, in from_config
        _cfg = cfg_class(**_cfg)
    TypeError: __init__() got an unexpected keyword argument 'in_chans'
    

    Note that I am using tfimm==0.2.1 and everything worked very well with 0.1.5. In addition the following code work:

    import tensorflow as tf
    tf.keras.models.load_model('/my/model/path/vit_base_patch32_224_in21k/')
    
    opened by hyenal 2
  • add more verbosity to error message

    add more verbosity to error message

    It's a very small PR but it addresses an issue I had recently. I would like to add more verbosity to the error message for config file. Then the user would be aware of the faulty arguments.

    opened by hyenal 1
  • Adding convnext edge models

    Adding convnext edge models

    Many versions of ConvNeXt are now available pretrained in timm.

    To be able to load them in tfimm, the only code to add in: https://github.com/martinsbruveris/tensorflow-image-models/blob/b6742e455fe0d9a550f829917a8cef68000831b5/tfimm/architectures/convnext.py#L439

    Would be the following:

    @register_model
    def convnext_atto():
        cfg = ConvNeXtConfig(
            name="convnext_atto",
            url="[timm]",
            embed_dim=(40, 80, 160, 320),
            nb_blocks=(2, 2, 6, 2),
        )
        return ConvNeXt, cfg
    
    @register_model
    def convnext_femto():
        cfg = ConvNeXtConfig(
            name="convnext_femto",
            url="[timm]",
            embed_dim=(48,  96,  192,  384),
            nb_blocks=(2, 2, 6, 2),
        )
        return ConvNeXt, cfg
    
    @register_model
    def convnext_pico():
        cfg = ConvNeXtConfig(
            name="convnext_pico",
            url="[timm]",
            embed_dim=(64, 128,  256,  512),
            nb_blocks=(2, 2, 6, 2),
        )
        return ConvNeXt, cfg
    
    @register_model
    def convnext_nano():
        cfg = ConvNeXtConfig(
            name="convnext_nano",
            url="[timm]",
            embed_dim=(80, 160,  320,  640),
            nb_blocks=(2, 2, 8, 2),
        )
        return ConvNeXt, cfg
    

    I've tested it locally and it works perfectly. Thanks in advance

    opened by scrouzet 0
  • New feature: Loading weights of fine-tuned timm model to keras

    New feature: Loading weights of fine-tuned timm model to keras

    So far, tfimm allows to create and initialize keras models using default timm weights as follows: tfimm.create_model(TIMM_MODEL_NAME, pretrained="timm")

    It is also useful to be able to load a fine-tuned timm model. This is what I implemented and would like to see in the future releases. I also added a Jupyter notebook to demonstrate usage.

    opened by Alkhaddour 0
  • PVT model not training..

    PVT model not training..

    Describe the bug PVT model does not train.

    To Reproduce Steps to reproduce the behaviour:

    import tfimm 
    import tensorflow_datasets as tfds
    import tensorflow as tf
    
    def resize_normalize(x, y):
        x = tf.image.resize(x, (224, 224)) / 255
        return x, y
    
    train_ds = tfds.load('imagenet_v2', 
                   split='test', 
                   as_supervised=True)
    train_ds = train_ds.map(resize_normalize).batch(32)
    
    model = tfimm.create_model("pvt_tiny", pretrained=None)
    
    model.compile(optimizer=tf.keras.optimizers.Adam(1e-3), loss="sparse_categorical_crossentropy", metrics=["accuracy"])
    model.fit(train_ds)
    
    Epoch 1/5
    313/313 [==============================] - 67s 187ms/step - loss: 15.6424 - accuracy: 6.0000e-04
    Epoch 2/5
    313/313 [==============================] - 60s 191ms/step - loss: 16.2130 - accuracy: 0.0010
    Epoch 3/5
    313/313 [==============================] - 60s 191ms/step - loss: 16.2144 - accuracy: 0.0010
    Epoch 4/5
    313/313 [==============================] - 60s 191ms/step - loss: 16.2418 - accuracy: 0.0010
    Epoch 5/5
    313/313 [==============================] - 60s 191ms/step - loss: 16.2417 - accuracy: 0.0010
    

    Expected behaviour Convergance of model

    Desktop (please complete the following information):

    • OS: Windows 11
    • Repo version: 0.2.7
    • TensorFlow version with CUDA/cuDNN [e.g. TF 2.9.1 with CUDA 11.2]

    Also note that setting the LR to 1e-4 as the paper does not solve the problem.

    opened by ma7555 0
Releases(v0.2.9)
  • v0.2.9(Oct 28, 2022)

  • v0.2.8(Sep 5, 2022)

  • v0.2.7(Jun 14, 2022)

  • v0.2.6(May 13, 2022)

  • v0.2.5(Feb 21, 2022)

  • v0.2.4(Jan 31, 2022)

  • v0.2.3(Jan 20, 2022)

  • v0.2.2(Jan 17, 2022)

  • v0.2.1(Jan 7, 2022)

  • v0.2.0(Jan 3, 2022)

    Added some models and a first version of a training framework.

    • Added hybrid Vision Transformers (vit_hybrid).
    • Added resnetv2 module, which inlcudes Big Transfer (BiT) resnets.
    • Added Pyramid Vision Transformer models
    • Added first version of training framework (tfimm/train). Still work in progress. Possibly buggy.
    Source code(tar.gz)
    Source code(zip)
  • v0.1.5(Dec 12, 2021)

    Various improvements to the library without adding new models

    • Added option for models to return intermediate features via return_features parameter
    • Added DropPath regularization to vit module (stochastic depth)
    • Added ability to load saved models from a local cache
    Source code(tar.gz)
    Source code(zip)
  • v0.1.4(Dec 8, 2021)

  • v0.1.3(Dec 7, 2021)

    Added more transformer architectures and ResNet models

    • Added CaiT models
    • Added MLP-Mixer, ResMLP and gMLP models
    • Added ResNet models
    • Fixed bug with Swin Transformer and mixed precision
    Source code(tar.gz)
    Source code(zip)
  • v0.1.2(Nov 25, 2021)

    Some new architectures and minor change to dependencies.

    • Reduced TF version requirement from 2.5 to 2.4.
    • Added ConvMixer models
    • Added Swin Transformer models
    Source code(tar.gz)
    Source code(zip)
  • v0.1.1(Nov 21, 2021)

    Mostly small changes.

    • Refactored code in resnet.py.
    • Added create_preprocessing function to generate model-specific preprocessing.
    • Added profiling results (max batch size and throughput for inference and backpropagation) for K80 and V100 (float32 and mixed precision) GPUs.
    • Fixed bug with ViT models and mixed precision.
    Source code(tar.gz)
    Source code(zip)
  • v0.1.0(Nov 17, 2021)

Owner
Martins Bruveris
Senior applied scientist at Onfido applying deep learning to computer vision problems
Martins Bruveris
A pytorch implementation of Detectron. Both training from scratch and inferring directly from pretrained Detectron weights are available.

Use this instead: https://github.com/facebookresearch/maskrcnn-benchmark A Pytorch Implementation of Detectron Example output of e2e_mask_rcnn-R-101-F

Roy 2.8k Dec 29, 2022
🔪 Elimination based Lightweight Neural Net with Pretrained Weights

ELimNet ELimNet: Eliminating Layers in a Neural Network Pretrained with Large Dataset for Downstream Task Removed top layers from pretrained Efficient

snoop2head 4 Jul 12, 2022
High level network definitions with pre-trained weights in TensorFlow

TensorNets High level network definitions with pre-trained weights in TensorFlow (tested with 2.1.0 >= TF >= 1.4.0). Guiding principles Applicability.

Taehoon Lee 1k Dec 13, 2022
Inflated i3d network with inception backbone, weights transfered from tensorflow

I3D models transfered from Tensorflow to PyTorch This repo contains several scripts that allow to transfer the weights from the tensorflow implementat

Yana 479 Dec 8, 2022
The original weights of some Caffe models, ported to PyTorch.

pytorch-caffe-models This repo contains the original weights of some Caffe models, ported to PyTorch. Currently there are: GoogLeNet (Going Deeper wit

Katherine Crowson 9 Nov 4, 2022
Facebook Research 605 Jan 2, 2023
Pretrained SOTA Deep Learning models, callbacks and more for research and production with PyTorch Lightning and PyTorch

Pretrained SOTA Deep Learning models, callbacks and more for research and production with PyTorch Lightning and PyTorch

Pytorch Lightning 1.4k Jan 1, 2023
PyTorch implementation of Wide Residual Networks with 1-bit weights by McDonnell (ICLR 2018)

1-bit Wide ResNet PyTorch implementation of training 1-bit Wide ResNets from this paper: Training wide residual networks for deployment using a single

Sergey Zagoruyko 122 Dec 7, 2022
🐥A PyTorch implementation of OpenAI's finetuned transformer language model with a script to import the weights pre-trained by OpenAI

PyTorch implementation of OpenAI's Finetuned Transformer Language Model This is a PyTorch implementation of the TensorFlow code provided with OpenAI's

Hugging Face 1.4k Jan 5, 2023
A python code to convert Keras pre-trained weights to Pytorch version

Weights_Keras_2_Pytorch 最近想在Pytorch项目里使用一下谷歌的NIMA,但是发现没有预训练好的pytorch权重,于是整理了一下将Keras预训练权重转为Pytorch的代码,目前是支持Keras的Conv2D, Dense, DepthwiseConv2D, Batch

Liu Hengyu 2 Dec 16, 2021
Vanilla and Prototypical Networks with Random Weights for image classification on Omniglot and mini-ImageNet. Made with Python3.

vanilla-rw-protonets-project Vanilla Prototypical Networks and PNs with Random Weights for image classification on Omniglot and mini-ImageNet. Made wi

Giovani Candido 8 Aug 31, 2022
TensorFlow ROCm port

Documentation TensorFlow is an end-to-end open source platform for machine learning. It has a comprehensive, flexible ecosystem of tools, libraries, a

ROCm Software Platform 622 Jan 9, 2023
Tensorflow port of a full NetVLAD network

netvlad_tf The main intention of this repo is deployment of a full NetVLAD network, which was originally implemented in Matlab, in Python. We provide

Robotics and Perception Group 225 Nov 8, 2022
Minimal implementation of Denoised Smoothing: A Provable Defense for Pretrained Classifiers in TensorFlow.

Denoised-Smoothing-TF Minimal implementation of Denoised Smoothing: A Provable Defense for Pretrained Classifiers in TensorFlow. Denoised Smoothing is

Sayak Paul 19 Dec 11, 2022
(ImageNet pretrained models) The official pytorch implemention of the TPAMI paper "Res2Net: A New Multi-scale Backbone Architecture"

Res2Net The official pytorch implemention of the paper "Res2Net: A New Multi-scale Backbone Architecture" Our paper is accepted by IEEE Transactions o

Res2Net Applications 928 Dec 29, 2022
Pretrained Pytorch face detection (MTCNN) and recognition (InceptionResnet) models

Face Recognition Using Pytorch Python 3.7 3.6 3.5 Status This is a repository for Inception Resnet (V1) models in pytorch, pretrained on VGGFace2 and

Tim Esler 3.3k Jan 4, 2023
Official PyTorch implementation and pretrained models of the paper Self-Supervised Classification Network

Self-Classifier: Self-Supervised Classification Network Official PyTorch implementation and pretrained models of the paper Self-Supervised Classificat

Elad Amrani 24 Dec 21, 2022
Base pretrained models and datasets in pytorch (MNIST, SVHN, CIFAR10, CIFAR100, STL10, AlexNet, VGG16, VGG19, ResNet, Inception, SqueezeNet)

This is a playground for pytorch beginners, which contains predefined models on popular dataset. Currently we support mnist, svhn cifar10, cifar100 st

Aaron Chen 2.4k Dec 28, 2022