Giter VIP home page Giter VIP logo

shufflenet-tensorflow's Introduction

ShuffleNet

This is an implementation of ShuffleNet: An Extremely Efficient Convolutional Neural Network for Mobile Devices. It is written in Tensorflow and tested on Tiny ImageNet dataset. The dataset consists of 64x64 images and has 200 classes. The network gives validation accuracy ~49% after 40 epochs (it takes ~2.2 hours on p2.xlarge).

Implementation details

  • I use reduced in size ShuffleNet: in the original paper it has more layers.
    But it is easy to change a couple of parameters in shufflenet/CONSTANTS.py to make it like the original.
  • For the input pipeline I use tf.data.TFRecordDataset.
  • For data augmentation I use 56x56 sized random crops and random color manipulations.
  • I use a reduce-on-plateau learning rate scheduler.

How to use it

Assuming that Tiny ImageNet data is in /home/ubuntu/data/tiny-imagenet-200/ steps are

  • cd ShuffleNet-tensorflow.
  • python tiny_imagenet/move_data.py
    to slightly change the folder structure of the data.
  • python image_dataset_to_tfrecords.py
    to convert the dataset to tfrecords format.
  • (optional) If you want to change the network's length,
    edit the number of ShuffleNet Units in shufflenet/CONSTANTS.py.
  • python train.py
    to begin training. Evaluation is after each epoch.
  • logs and the saved model will be in logs/run0 and saved/run0.

To train on your dataset, you need to change a few values in shufflenet/CONSTANTS.py file.

Requirements

  • Python 3.6
  • tensorflow 1.4
  • tqdm, Pillow, pandas, numpy

shufflenet-tensorflow's People

Contributors

tropcomplique avatar

Watchers

paper2code - bot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.