• Stars
    star
    291
  • Rank 137,288 (Top 3 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 5 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Implementing Searching for MobileNetV3 paper using Pytorch

Implementing Searching for MobileNetV3 paper using Pytorch

  • The current model is a very early model. I will modify it as a general model as soon as possible.

Paper

  • Searching for MobileNetV3 paper
  • Author: Andrew Howard(Google Research), Mark Sandler(Google Research, Grace Chu(Google Research), Liang-Chieh Chen(Google Research), Bo Chen(Google Research), Mingxing Tan(Google Brain), Weijun Wang(Google Research), Yukun Zhu(Google Research), Ruoming Pang(Google Brain), Vijay Vasudevan(Google Brain), Quoc V. Le(Google Brain), Hartwig Adam(Google Research)

Todo

  • Experimental need for ImageNet dataset.
  • Code refactoring

MobileNetV3 Block

캑처

Experiments

  • For CIFAR-100 data, I experimented with resize (224, 224).
Datasets Model acc1 acc5 Epoch Parameters
CIFAR-100 MobileNetV3(LARGE) 70.44% 91.34% 80 3.99M
CIFAR-100 MobileNetV3(SMALL) 67.04% 89.41% 55 1.7M
IMAGENET MobileNetV3(LARGE) WORK IN PROCESS 5.15M
IMAGENET MobileNetV3(SMALL) WORK IN PROCESS 2.94M

Usage

Train

python main.py
  • If you want to change hyper-parameters, you can check "python main.py --help"

Options:

  • --dataset-mode (str) - which dataset you use, (example: CIFAR10, CIFAR100), (default: CIFAR100).
  • --epochs (int) - number of epochs, (default: 100).
  • --batch-size (int) - batch size, (default: 128).
  • --learning-rate (float) - learning rate, (default: 1e-1).
  • --dropout (float) - dropout rate, (default: 0.3).
  • --model-mode (str) - which network you use, (example: LARGE, SMALL), (default: LARGE).
  • --load-pretrained (bool) - (default: False).
  • --evaluate (bool) - Used when testing. (default: False).
  • --multiplier (float) - (default: 1.0).

Test

python main.py --evaluate True
  • Put the saved model file in the checkpoint folder and saved graph file in the saved_graph folder and type "python main.py --evaluate True".
  • If you want to change hyper-parameters, you can check "python test.py --help"

Options:

  • --dataset-mode (str) - which dataset you use, (example: CIFAR10, CIFAR100), (default: CIFAR100).
  • --epochs (int) - number of epochs, (default: 100).
  • --batch-size (int) - batch size, (default: 128).
  • --learning-rate (float) - learning rate, (default: 1e-1).
  • --dropout (float) - dropout rate, (default: 0.3).
  • --model-mode (str) - which network you use, (example: LARGE, SMALL), (default: LARGE).
  • --load-pretrained (bool) - (default: False).
  • --evaluate (bool) - Used when testing. (default: False).
  • --multiplier (float) - (default: 1.0).

Number of Parameters

import torch

from model import MobileNetV3

def get_model_parameters(model):
    total_parameters = 0
    for layer in list(model.parameters()):
        layer_parameter = 1
        for l in list(layer.size()):
            layer_parameter *= l
        total_parameters += layer_parameter
    return total_parameters

tmp = torch.randn((128, 3, 224, 224))
model = MobileNetV3(model_mode="LARGE", multiplier=1.0)
print("Number of model parameters: ", get_model_parameters(model))

Requirements

  • torch==1.0.1

More Repositories

1

Attention-Augmented-Conv2d

Implementing Attention Augmented Convolutional Networks using Pytorch
Python
639
star
2

Stand-Alone-Self-Attention

Implementing Stand-Alone Self-Attention in Vision Models using Pytorch
Python
454
star
3

BottleneckTransformers

Bottleneck Transformers for Visual Recognition
Python
265
star
4

LambdaNetworks

Implementing Lambda Networks using Pytorch
Python
138
star
5

Billion-scale-semi-supervised-learning

Implementing Billion-scale semi-supervised learning for image classification using Pytorch
Python
89
star
6

RandWireNN

Implementing Randomly Wired Neural Networks for Image Recognition, Using CIFAR-10 dataset, CIFAR-100 dataset
Jupyter Notebook
88
star
7

Synthesizer-Rethinking-Self-Attention-Transformer-Models

Implementing SYNTHESIZER: Rethinking Self-Attention in Transformer Models using Pytorch
Python
70
star
8

CLIP

CLIP: Connecting Text and Image (Learning Transferable Visual Models From Natural Language Supervision)
Python
69
star
9

Mixed-Depthwise-Convolutional-Kernels

Implementing MixNet: Mixed Depthwise Convolutional Kernels using Pytorch
Python
60
star
10

SimSiam

Exploring Simple Siamese Representation Learning
Python
57
star
11

Action-Localization

Action-Localization, Atomic Visual Actions (AVA) Dataset
Python
23
star
12

Bag-of-MLP

Bag of MLP
Python
19
star
13

PSPNet

Implementing Pyramid Scene Parsing Network (PSPNet) paper using Pytorch
Python
14
star
14

DiffusionModel

Re-implementating Diffusion model using Pytorch
Python
7
star
15

AssembleNet

Implementing AssembleNet: Searching for Multi-Stream Neural Connectivity in Video Architectures Explain using Pytorch
Python
7
star
16

OmniNet

OmniNet: Omnidirectional Representations from Transformers
Python
6
star
17

Backpropagation-CNN-basic

Python
6
star
18

Graph-Convolutional-Network

Python
5
star
19

Phasic-Policy-Gradient

Phasic-Policy-Gradient
Python
5
star
20

bag-of-rl

Bag of Reinforcement Learning Algorithm
Python
5
star
21

minimal-BERT

Bidirectional Encoder Representations from Transformers
Python
4
star
22

Vision-Language

Vision-Language, Solve GQA(Visual Reasoning in the Real World) dataset.
Python
3
star
23

minimal-cyclegan

Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks
Python
3
star
24

Transformer

Implementing Attention Is All You Need paper. Transformer Model
Python
2
star
25

minimal-stylegan

Python
2
star
26

SlowFast

SlowFast Network
Python
1
star
27

minimal-segmentation

minimal-segmentation
Python
1
star