Implementation of Squeezenet in pytorch, pretrained models on Cifar 10 data to come

Overview

Pytorch Squeeznet

Pytorch implementation of Squeezenet model as described in https://arxiv.org/abs/1602.07360 on cifar-10 Data.

The definition of Squeezenet model is present model.py. The training procedure resides in the file main.py

Command to train the Squeezenet model on CIFAR 10 data is:

python main.py --batch-size 32 --epoch 10

Other options which can be used are specified in main.py Eg: if you want to use a pretrained_model

python main.py --batch-size 32 --epoch 10 --model_name "pretrained model"

I am currently using SGD for training : learning rate and weight decay are currently updated using a 55 epoch learning rule, this usually gives good performance, but if you want to use something of your own, you can specify it by passing learning_rate and weight_decay parameter like so

python main.py --batch-size 32 --epoch 10 --learning_rate 1e-3 --epoch_55
You might also like...
Official PyTorch implementation and pretrained models of the paper Self-Supervised Classification Network
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

VisualGPT: Data-efficient Adaptation of Pretrained Language Models for Image Captioning
VisualGPT: Data-efficient Adaptation of Pretrained Language Models for Image Captioning

VisualGPT Our Paper VisualGPT: Data-efficient Adaptation of Pretrained Language Models for Image Captioning Main Architecture of Our VisualGPT Downloa

The PASS dataset: pretrained models and how to get the data -  PASS: Pictures without humAns for Self-Supervised Pretraining
The PASS dataset: pretrained models and how to get the data - PASS: Pictures without humAns for Self-Supervised Pretraining

The PASS dataset: pretrained models and how to get the data - PASS: Pictures without humAns for Self-Supervised Pretraining

(ImageNet pretrained models) The official pytorch implemention of the TPAMI paper
(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

Pretrained Pytorch face detection (MTCNN) and recognition (InceptionResnet) models
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

Reference implementation of code generation projects from Facebook AI Research. General toolkit to apply machine learning to code, from dataset creation to model training and evaluation. Comes with pretrained models.

This repository is a toolkit to do machine learning for programming languages. It implements tokenization, dataset preprocessing, model training and m

DenseNet Implementation in Keras with ImageNet Pretrained Models

DenseNet-Keras with ImageNet Pretrained Models This is an Keras implementation of DenseNet with ImageNet pretrained weights. The weights are converted

[CVPR 2021] Pytorch implementation of Hijack-GAN: Unintended-Use of Pretrained, Black-Box GANs

Hijack-GAN: Unintended-Use of Pretrained, Black-Box GANs In this work, we propose a framework HijackGAN, which enables non-linear latent space travers

A pytorch implementation of Detectron. Both training from scratch and inferring directly from pretrained Detectron weights are available.
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

Comments
  • RuntimeError: shape '[64, 10]' is invalid for input of size 160

    RuntimeError: shape '[64, 10]' is invalid for input of size 160

    when i use a batch-size of 64, an runtime error occurs when it will almost finish the firt epoch training: Train Epoch: 1 [49344/50000 (99%)] Loss: 1.619473 Train Epoch: 1 [49984/50000 (100%)] Loss: 1.664685 Traceback (most recent call last): File "F:/paper_code/pytorch_Squeezenet/main.py", line 208, in train_acc.append(train(i)) File "F:/paper_code/pytorch_Squeezenet/main.py", line 126, in train scores = scores.view(args.batch_size, args.num_classes) RuntimeError: shape '[64, 10]' is invalid for input of size 160

    can anyone tell me what i should do?QAQ

    opened by ChipsGuardian 3
  • RuntimeError: shape '[32, 10]' is invalid for input of size 160

    RuntimeError: shape '[32, 10]' is invalid for input of size 160

    Sorry to disturb. I tried to run squeezenet using pytorch on GPU. And I got this error at the end of Epoch 1. Train Epoch: 1 [48992/50000 (98%)] Loss: 1.618558 Train Epoch: 1 [49312/50000 (99%)] Loss: 1.442842 Train Epoch: 1 [49632/50000 (99%)] Loss: 1.601359 Train Epoch: 1 [49952/50000 (100%)] Loss: 1.511631 Traceback (most recent call last): File "main.py", line 228, in train_acc.append(train(i)) File "main.py", line 131, in train scores = scores.view(args.batch_size, args.num_classes) RuntimeError: shape '[32, 10]' is invalid for input of size 160 Thank you for any suggestion.

    opened by Kirito0816 1
  • code error in main.py

    code error in main.py


    NameError Traceback (most recent call last) ~\pytorch_Squeezenet-master\main.py in 204 fig2, ax2 = plt.subplots() 205 train_acc, val_acc = list(), list() --> 206 for i in xrange(1,args.epoch+1): 207 train_acc.append(train(i)) 208 val_acc.append(val())

    NameError: name 'xrange' is not defined

    opened by Rukhmini 1
Owner
gaurav pathak
Intern
gaurav pathak
3.8% and 18.3% on CIFAR-10 and CIFAR-100

Wide Residual Networks This code was used for experiments with Wide Residual Networks (BMVC 2016) http://arxiv.org/abs/1605.07146 by Sergey Zagoruyko

Sergey Zagoruyko 1.2k Dec 29, 2022
2.86% and 15.85% on CIFAR-10 and CIFAR-100

Shake-Shake regularization This repository contains the code for the paper Shake-Shake regularization. This arxiv paper is an extension of Shake-Shake

Xavier Gastaldi 294 Nov 22, 2022
CIFAR-10_train-test - training and testing codes for dataset CIFAR-10

CIFAR-10_train-test - training and testing codes for dataset CIFAR-10

Frederick Wang 3 Apr 26, 2022
An Agnostic Computer Vision Framework - Pluggable to any Training Library: Fastai, Pytorch-Lightning with more to come

IceVision is the first agnostic computer vision framework to offer a curated collection with hundreds of high-quality pre-trained models from torchvision, MMLabs, and soon Pytorch Image Models. It orchestrates the end-to-end deep learning workflow allowing to train networks with easy-to-use robust high-performance libraries such as Pytorch-Lightning and Fastai

airctic 789 Dec 29, 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
TensorFlow2 Classification Model Zoo playing with TensorFlow2 on the CIFAR-10 dataset.

Training CIFAR-10 with TensorFlow2(TF2) TensorFlow2 Classification Model Zoo. I'm playing with TensorFlow2 on the CIFAR-10 dataset. Architectures LeNe

Chia-Hung Yuan 16 Sep 27, 2022
Training Cifar-10 Classifier Using VGG16

opevcvdl-hw3 This project uses pytorch and Qt to achieve the requirements. Version Python 3.6 opencv-contrib-python 3.4.2.17 Matplotlib 3.1.1 pyqt5 5.

Kenny Cheng 3 Aug 17, 2022
Training a deep learning model on the noisy CIFAR dataset

Training-a-deep-learning-model-on-the-noisy-CIFAR-dataset This repository contai

null 1 Jun 14, 2022
Everything you want about DP-Based Federated Learning, including Papers and Code. (Mechanism: Laplace or Gaussian, Dataset: femnist, shakespeare, mnist, cifar-10 and fashion-mnist. )

Differential Privacy (DP) Based Federated Learning (FL) Everything about DP-based FL you need is here. (所有你需要的DP-based FL的信息都在这里) Code Tip: the code o

wenzhu 83 Dec 24, 2022