Giter VIP home page Giter VIP logo

cnns_for_classifing_cifar10's Introduction

CNNs_for_classifing_CIFAR10

An implement of CNNs for classifing on CIFAR10 with tensorflow. In order to adapt to the size of CIFAR10, I adjusted some parameters in the network. And it's easy to fit it taining on other dataset.

  • LeNet
  • AlexNet
  • VGG16
  • GoogLeNet
  • ResNet50

Requirements

  • python 3.6.3
  • tensorflow 1.13.1
  • numpy 1.16.3
  • CIFAR10 can be download here. The path to ‘cifar-10-batches-py’ can be specified with the optional parameter ‘--dataset_dir’, which by default is placed in the root directory.

Train and Test

Here I only iterate 20 epoches (10000 steps), you can increase the number of iterations by using the last trained model to achieve higher accuracy. Besides, you can also change learning rate and steps in ‘main.py’.

# Train and test by default.
$ python main.py

# Train with optional patameters and test.
$ python main.py	--model_type	[LeNet/AlexNet/VGG16/GoogLeNet/ResNet50] 
			--dataset_dir	[Path to cifar-10-batches-py] 
			--model_dir	[A .ckpt file of pretrained model or A folder for saving model] 

Use GPU

  • CUDA 8.0.61
  • CUDNN 5.1
  • tensorflow_gpu 1.2.0
# Chose GPU to use
$ CUDA_VISIBLE_DEVICES=0 python main.py (optional patameters...)

Logs

$ tensorboard --logdir=/logs

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.