• Stars
    star
    683
  • Rank 66,158 (Top 2 %)
  • Language
    Python
  • Created over 5 years ago
  • Updated over 5 years ago

Reviews

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

Repository Details

Implementation of: "Exploring Randomly Wired Neural Networks for Image Recognition"

RandWireNN

PWC

Unofficial PyTorch Implementation of: Exploring Randomly Wired Neural Networks for Image Recognition.

Results

Validation result on Imagenet(ILSVRC2012) dataset:

Top 1 accuracy (%) Paper Here
RandWire-WS(4, 0.75), C=78 74.7 69.2
  • (2019.06.26) 69.2%: 250 epoch with SGD optimizer, lr 0.1, momentum 0.9, weight decay 5e-5, cosine annealing lr schedule (no label smoothing applied, see loss curve below)
  • (2019.04.14) 62.6%: 396k steps with SGD optimizer, lr 0.1, momentum 0.9, weigth decay 5e-5, lr decay about 0.1 at 300k
  • (2019.04.12) 62.6%: 416k steps with Adabound optimizer, initial lr 0.001(decayed about 0.1 at 300k), final lr 0.1, no weight decay
  • (2019.04) JiaminRen's implementation reached accuarcy which is almost close to paper, using identical training strategy with paper.
  • (2019.04.10) 63.0%: 450k steps with Adam optimizer, initial lr 0.001, lr decay about 0.1 for every 150k step
  • (2019.04.07) 56.8%: Training took about 16 hours on AWS p3.2xlarge(NVIDIA V100). 120k steps were done in total, and Adam optimizer with lr=0.001, batch_size=128 was used with no learning rate decay.

Dependencies

This code was tested on Python 3.6 with PyTorch 1.0.1. Other packages can be installed by:

pip install -r requirements.txt

Generate random DAG

cd model/graphs
python er.py -p 0.2 -o er-02.txt # Erdos-Renyi
python ba.py -m 7 -o ba-7.txt # Barbasi-Albert
python ws.py -k 4 -p 0.75 ws-4-075.txt # Watts-Strogatz
# number of nodes: -n option

All outputs from commands shown above will produce txt file like:

(number of nodes)
(number of edges)
(lines, each line representing edges)

Train RandWireNN

  1. Download ImageNet dataset. Train/val folder should contain list of 1,000 directories, each containing list of images for corresponding category. For validation image files, this script can be useful: https://raw.githubusercontent.com/soumith/imagenetloader.torch/master/valprep.sh

  2. Edit config.yaml

    cd config
    cp default.yaml config.yaml
    vim config.yaml # specify data directory, graph txt files
  3. Train

    Note. Validation performed here won't use entire test set, since it will consume much time. (about 3 min.)

    python trainer.py -c [config yaml] -m [name]
    
  4. View tensorboardX

    tensorboard --logdir ./logs
    

Validation

Run full validation:

python validation.py -c [config path] -p [checkpoint path]

This will show accuracy and average test loss of the trained model.

Author

Seungwon Park / @seungwonpark

License

Apache License 2.0

More Repositories

1

melgan

MelGAN vocoder (compatible with NVIDIA/tacotron2)
Python
631
star
2

ghudegy-chain

Nth commit must have commit hash with N leading zeros - μ§„μ§œ ꡬ데기컡 2018
Python
89
star
3

awesome-tts-samples

Awesome list of TTS papers with audio samples
58
star
4

awesome-model-cards

Resources related to the model cards for ML
11
star
5

istft-pytorch

Two different PyTorch implementation of Inverse-STFT for discussion at https://github.com/keunwoochoi/torchaudio-contrib/issues/27
Python
9
star
6

can-google-ocr-this

Will these images/videos eventually show up in the google search results?
7
star
7

LearningToProtect

Implementation of "Learning to Protect Communications with Adversarial Neural Cryptography" in PyTorch
Python
6
star
8

PS-latex-template

LaTeX template for PS description
TeX
5
star
9

tex-lecture

κ°•μ˜ - 텍: λ¬Έμ„œ μž‘μ—… 효율의 κ·ΉλŒ€ν™”. (2018.11.05 @ SNU)
4
star
10

norazo-lotto

λ‹ˆνŒ”μžμ•Όμ— λ‚˜μ˜¨ 둜또번호 비ꡐ
PHP
3
star
11

lipsum-seminar

Lecture Notes of Lorem Ipsum Seminar (2017 Summer)
Jupyter Notebook
3
star
12

tikzNN

Neural Net related illustrations using TikZ
TeX
3
star
13

dotfiles

짜깁기둜 μ‹œμž‘ν•˜λŠ” dotfiles
Shell
2
star
14

HR-Diagram

Software for drawing H-R Diagram
Python
2
star
15

SNU_physics_board_rss

SNU Physics Board RSS feed
Python
2
star
16

mediapipe_arch_vis

Collection of naive visualization of tflite models from MediaPipe
HTML
2
star
17

SunSpotTracker

Crawl images of the Sun from SDO HMII and track sunspots from them.
Python
2
star
18

voxceleb_tools

Shell
1
star
19

seungwonpark.github.io

Seung-won Park's homepage
SCSS
1
star
20

userscripts

Personal collection of userscripts (I use Tampermonkey)
JavaScript
1
star
21

tikz-gallery

My small TikZ gallery
1
star