Git Product home page Git Product logo

resnet-tensorflow's Introduction

Residual Networks in TensorFlow

Residual Network in TensorFlow

This entire code is implemented in pure TensorFlow and I have made it simple to run with different settings.

Simple Instructions

  • Running Training and Evaluation

    • python main.py
      • If you want to modify any parameters, you can use for example python main.py --n_epoch==10
        • The default runs on CIFAR-10 dataset and this configuration is made for that.
        • n_epoch: number of epochs
          • Default 10
        • n_batch: batch size
          • Default 64
        • n_img_row: dimension of image (row)
          • Default 32
        • n_img_col: dimension of image (col)
          • Default 32
        • n_img_channels: number of channels
          • Default 3
        • n_classes: number of classes
          • Default 10
        • lr: learning rate (momentum optimizer)
          • Default 0.1
        • n_resid_units: number of residual units
          • Default 5
        • lr_schedule: number of epoch for the learning rate to decrease by lr_factor
          • Default 60
          • This multiplies the LR every 60 epochs by lr_factor.
        • lr_factor: the factor for reducing LR
          • Default 0.1.
  • Running TensorBoard

    • Training logs
      • tensorboard --logdir=train_log
    • Evaluation logs
      • tensorboard --logdir=eval_log
    • You can use any path you want.
      • If you encountered a permission denied error, you can easily solve it by changing the directory to tmp/train_log.
      • I experienced this while running on Amazon AWS and it was solved with this fix.

Credits

Dependencies

  • To simplify the code, I read the CIFAR dataset using TensorLayer.
    • Simply run sudo pip install tensorlayer and you are good to go.
  • TensorFlow v0.12
    • If you would like to run this code in a few minutes on Amazon AWS, just use the open-source AMI TFAMI.v3.

License

MIT

resnet-tensorflow's People

Contributors

ritchieng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  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.