GithubHelp home page GithubHelp logo

wqiiqw / tensorflow_resnet_cifar10 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from guillaumemougeot/tensorflow_resnet_cifar10

0.0 0.0 0.0 13 KB

Proper tensorflow implementation of ResNet-s for CIFAR10 dataset corresponding to the original paper.

License: MIT License

Python 100.00%

tensorflow_resnet_cifar10's Introduction

tensorflow_resnet_cifar10

This repositories contains an implementation of the original ResNet paper with tensorflow 2 and keras on the CIFAR10 dataset.

Requirements

Before running the training be sure the following python libraries are installed:

  • tensorflow 2.3.1 or higher
  • matplotlib 3.3.2 or higher
  • numpy 1.18.5 or higher
  • scikit-image 0.16.2 or higher

Run

Before training, the CIFAR10 dataset needs to be converted into tfrecord files. To do so, please use the following command by replacing the path/to/cifar10 with the appropriate location:

python prepare_data.py --data_path='/path/to/cifar10'

The training of all the resnets can be run with:

python train.py

If you want to train only a particular ResNet or change the training hyperparameters, please edit the global variables defined in the beginning of train.py.

Logs

During training, this implementation will store regularly:

  • the keras model
  • the tensorboard logs
  • images of the model predictions on a batch of test samples

Performance

The performances below were obtained by doing only one run on all the model and taking the best test error during training. With model selection, the test errors should undoubtedly improve.

Name # layers # params Test err(paper) Test err(this impl.)
ResNet20 20 0.27M 8.75% 8.68%
ResNet32 32 0.46M 7.51% 7.69%
ResNet44 44 0.66M 7.17% 7.31%
ResNet56 56 0.85M 6.97% 7.04%
ResNet110 110 1.7M 6.43% 6.75%
ResNet120 1202 19.4M 7.93% 7.33%

Acknowledgement

This code is inspired by the two following repositories:

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.