Wide Residual Networks (WideResNets) in PyTorch

Overview
Comments
  • NaN output with distributed training

    NaN output with distributed training

    Hi, thanks for this project. Just opening for future investigation. I am finding that training with more than one GPU using the basic pytorch DPP demo on CIFAR-10 results in NaN outputs after a few epochs. Training using a single gpu works great within the DPP framework.

    The implementation from [meliketoy](https://github.com/meliketoy/wide-resnet.pytorch works fine, but uses more gpu memory.

    opened by choltz95 2
  • Size mismatch

    Size mismatch

    Hey there,

    I'm trying WideResNet on the following dataset, which consists of 256x256x3 images which should be classified into 17 classes.

    However I have a size issue on the network. With a batch size of 1, I expected a 1x17 output but I get a 64x17 output. With a batch size of 8 I get 512 x 17 output.

    I'm trying to understand the shapes of the tensors at each stage with with the following prints:

    def forward(self, x):
            print(x)
            out = self.conv1(x)
            print(out)
            out = self.block1(out)
            print(out)
            out = self.block2(out)
            print(out)
            out = self.block3(out)
            print(out)
            out = self.relu(self.bn1(out))
            print(out)
            out = F.avg_pool2d(out, 8)
            print(out)
            out = out.view(-1, self.nChannels)
            print(out)
            out = self.fc(out)
            print(out)
            return out
    
    $  python main.py
    Variable containing:
    ...
    [torch.FloatTensor of size 1x3x256x256]
    
    Variable containing:
    ...
    [torch.FloatTensor of size 1x16x256x256]
    
    Variable containing:
    ...
    [torch.FloatTensor of size 1x64x256x256]
    
    Variable containing:
    ...
    [torch.FloatTensor of size 1x128x128x128]
    
    Variable containing:
    ...
    [torch.FloatTensor of size 1x256x64x64]
    
    Variable containing:
    ...
    [torch.FloatTensor of size 1x256x64x64]
    
    Variable containing:
    ...
    [torch.FloatTensor of size 1x256x8x8]
    
    Variable containing:
    ...
    [torch.FloatTensor of size 64x256]
    
    Variable containing:
    ...
    [torch.FloatTensor of size 64x17]
    
    opened by mratsim 2
  • Add hubconf.py for compatibility with Torch Hub

    Add hubconf.py for compatibility with Torch Hub

    Will allow importing the model like so:

    model = torch.hub.load(
        'xternalz/WideResNet-pytorch', 
        'WideResNet', 
        depth=28, 
        num_classes=10, 
        widen_factor=2
    )
    

    Example: https://colab.research.google.com/drive/1CnYutDFEk9SSjdsEeE5nY5SPPZ843MNm?usp=sharing

    opened by AdeelH 0
  • AvgPool2d different from the original

    AvgPool2d different from the original

    @xternalz I think your avgpool https://github.com/xternalz/WideResNet-pytorch/blob/master/wideresnet.py#L81 and the original avgpool https://github.com/szagoruyko/wide-residual-networks/blob/master/pytorch/resnet.py#L56 use different strides (yours=kernelsize=8, original=1).

    opened by sungyoon-lee 2
  • The place to add dropout

    The place to add dropout

    In your code, you add dropout after relu2, your process is like dropout(relu2(bn2(conv1(relu1(bn1(x)))))).

    But it this code, he adds dropout after conv1, his process is like relu2(bn2(dropout(conv1(relu1(bn1(x)))))).

    Does it matter? What is the difference on performance between the two methods? I'm troubled, I can't reproduce the performance on CIFAR10(I only get accuracy at 93.2%) using the second method.

    opened by gauss-clb 0
Owner
Jason Kuen
Jason Kuen
A PyTorch implementation for PyramidNets (Deep Pyramidal Residual Networks)

A PyTorch implementation for PyramidNets (Deep Pyramidal Residual Networks) This repository contains a PyTorch implementation for the paper: Deep Pyra

Greg Dongyoon Han 262 Jan 3, 2023
PyTorch code for our ECCV 2018 paper "Image Super-Resolution Using Very Deep Residual Channel Attention Networks"

PyTorch code for our ECCV 2018 paper "Image Super-Resolution Using Very Deep Residual Channel Attention Networks"

Yulun Zhang 1.2k Dec 26, 2022
PyTorch version of the paper 'Enhanced Deep Residual Networks for Single Image Super-Resolution' (CVPRW 2017)

About PyTorch 1.2.0 Now the master branch supports PyTorch 1.2.0 by default. Due to the serious version problem (especially torch.utils.data.dataloade

Sanghyun Son 2.1k Jan 1, 2023
RMNet: Equivalently Removing Residual Connection from Networks

RM Operation can equivalently convert ResNet to VGG, which is better for pruning; and can help RepVGG perform better when the depth is large.

null 8 Nov 4, 2021
Image Super-Resolution Using Very Deep Residual Channel Attention Networks

Image Super-Resolution Using Very Deep Residual Channel Attention Networks

kongdebug 14 Oct 14, 2022
Torch implementation of "Enhanced Deep Residual Networks for Single Image Super-Resolution"

NTIRE2017 Super-resolution Challenge: SNU_CVLab Introduction This is our project repository for CVPR 2017 Workshop (2nd NTIRE). We, Team SNU_CVLab, (B

Bee Lim 625 Dec 30, 2022
Reproduce ResNet-v2(Identity Mappings in Deep Residual Networks) with MXNet

Reproduce ResNet-v2 using MXNet Requirements Install MXNet on a machine with CUDA GPU, and it's better also installed with cuDNN v5 Please fix the ran

Wei Wu 531 Dec 4, 2022
LaneDet is an open source lane detection toolbox based on PyTorch that aims to pull together a wide variety of state-of-the-art lane detection models

LaneDet is an open source lane detection toolbox based on PyTorch that aims to pull together a wide variety of state-of-the-art lane detection models. Developers can reproduce these SOTA methods and build their own methods.

TuZheng 405 Jan 4, 2023
[ICCV 2021] Official Pytorch implementation for Discriminative Region-based Multi-Label Zero-Shot Learning SOTA results on NUS-WIDE and OpenImages

Discriminative Region-based Multi-Label Zero-Shot Learning (ICCV 2021) [arXiv][Project page >> coming soon] Sanath Narayan*, Akshita Gupta*, Salman Kh

Akshita Gupta 54 Nov 21, 2022
[ICCV 2021] Official Pytorch implementation for Discriminative Region-based Multi-Label Zero-Shot Learning SOTA results on NUS-WIDE and OpenImages

Discriminative Region-based Multi-Label Zero-Shot Learning (ICCV 2021) [arXiv][Project page >> coming soon] Sanath Narayan*, Akshita Gupta*, Salman Kh

Akshita Gupta 54 Nov 21, 2022
Pytorch implementation of Deep Recursive Residual Network for Super Resolution (DRRN)

DRRN-pytorch This is an unofficial implementation of "Deep Recursive Residual Network for Super Resolution (DRRN)", CVPR 2017 in Pytorch. [Paper] You

yun_yang 192 Dec 12, 2022
PyTorch implementation of the Pose Residual Network (PRN)

Pose Residual Network This repository contains a PyTorch implementation of the Pose Residual Network (PRN) presented in our ECCV 2018 paper: Muhammed

Salih Karagoz 289 Nov 28, 2022
Repo for CVPR2021 paper "QPIC: Query-Based Pairwise Human-Object Interaction Detection with Image-Wide Contextual Information"

QPIC: Query-Based Pairwise Human-Object Interaction Detection with Image-Wide Contextual Information by Masato Tamura, Hiroki Ohashi, and Tomoaki Yosh

null 105 Dec 23, 2022
Repository providing a wide range of self-supervised pretrained models for computer vision tasks.

Hierarchical Pretraining: Research Repository This is a research repository for reproducing the results from the project "Self-supervised pretraining

Colorado Reed 53 Nov 9, 2022
WHENet: Real-time Fine-Grained Estimation for Wide Range Head Pose

WHENet: Real-time Fine-Grained Estimation for Wide Range Head Pose Yijun Zhou and James Gregson - BMVC2020 Abstract: We present an end-to-end head-pos

null 368 Dec 26, 2022
Details about the wide minima density hypothesis and metrics to compute width of a minima

wide-minima-density-hypothesis Details about the wide minima density hypothesis and metrics to compute width of a minima This repo presents the wide m

Nikhil Iyer 9 Dec 27, 2022
Project code for weakly supervised 3D object detectors using wide-baseline multi-view traffic camera data: WIBAM.

WIBAM (Work in progress) Weakly Supervised Training of Monocular 3D Object Detectors Using Wide Baseline Multi-view Traffic Camera Data 3D object dete

Matthew Howe 10 Aug 24, 2022
PyZebrascope - an open-source Python platform for brain-wide neural activity imaging in behaving zebrafish

PyZebrascope - an open-source Python platform for brain-wide neural activity imaging in behaving zebrafish

null 1 May 31, 2022
Event sourced bank - A wide-and-shallow example using the Python event sourcing library

Event Sourced Bank A "wide but shallow" example of using the Python event sourci

null 3 Mar 9, 2022