thanhmvu / awn

Official PyTorch implementation of Any-Width Networks (CVPRW'20)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Any-Width Networks

This repository is the official Pytorch implementation of Any-Width Network, a real-time adjustable-width CNN architecture that provides maximally fine-grained speed-accuracy trade-off during inference. For more information, please check out our CVPRW 2020 paper/arxiv and presentation.

Quick Start

  1. Requirements:

    • torch==1.4.0

    • torchvision==0.5.0

    • numpy==1.18.1

    • PyYAML==5.3

    • matplotlib==3.1.3

      (other versions may also work, but were not tested)

  2. Training:

    • To train, run: python train.py cfg:<path-to-yaml-config-file>
    • For example:
      • cd <project-root>
      • export CUDA_VISIBLE_DEVICES=0
      • python train.py cfg:cfg/lenet_cifar10_awn-rs.yml
  3. Testing:

    • To test, uncomment test_only: True in the config file used during training
    • Then run: python train.py cfg:<path-to-yaml-config-file>

Acknowledgement

This repository was built on top of Jiahui Yu's Slimmable Networks and Kuang Liu's CIFAR10 with PyTorch. Parts of the code were implemented prior to the official release of Slimmable Networks repo based on their paper and updated afterwards.

License

This repository is released under the CC 4.0 Attribution-NonCommercial International License and should only be used for educational and academic purposes. See LICENSE for more details.

Citation

If you find this repository useful for your own work, please cite our paper:

@InProceedings{Vu_2020_CVPR_Workshops,
  author = {Vu, Thanh and Eder, Marc and Price, True and Frahm, Jan-Michael},
  title = {Any-Width Networks},
  booktitle = {The IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops},
  month = {June},
  year = {2020}
}

About

Official PyTorch implementation of Any-Width Networks (CVPRW'20)

License:Other


Languages

Language:Python 100.0%