Skip to content

Manaswip/CIFAR-Classification-using-deep-convolutional-nets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

bcbd11e · Sep 25, 2016

History

2 Commits
Sep 19, 2016
Sep 19, 2016
Sep 25, 2016

Repository files navigation

CIFAR-10 dataset classification using deep convolutional networks

CIFAR 10 dataset contains images belonging to 10 different categories (airplane, automobile, bird, cat, deer, dog, frog, horse, sheep, truck). Images in this dataset do not have backgrounds, therefore any special data preprocessing steps are not required. But dataset is divided into 6 different batches, data from all the batches is retreived and stored in a mat file.

Code supports different kind of layer types( Full connected layer, convoluations layer, max pooling layer, softmax layer) and different activation functions (sigmoid, rectified linear units, tanh)

Code is built using Theano library so, this code can be run either on CPU or GPU, set GPU to true to run on GPU and set GPU to false to run on CPU

This program incorparates ideas and code from text book on Neural Networks and Deep learning from Michael Nielsen and Michael Nielsen's github

Project Layout

CIFARProcessingAndLoadingData.py.py: In this program data from 6 different batches is retrieved. Returns a list of training data, testing data, and validation data
CIFARraining_Theano.py: Implementation of deep convolutional networks using theano giving an advantage of running the code either on CPU/GPU. In addition to that this code supports different cost functions and activation functions

import cv2
import CIFAR
from CIFAR import Network
from CIFAR import ConvPoolLayer, FullyConnectedLayer, SoftmaxLayer
training_data, validation_data, test_data = CIFAR.load_data_shared()
mini_batch_size = 10
net = Network([
      ConvPoolLayer(image_shape=(mini_batch_size, 1, 32, 32), filter_shape=(20, 1, 5, 5),
      poolsize=(2, 2)), FullyConnectedLayer(n_in=201414, n_out=100),
      SoftmaxLayer(n_in=100, n_out=10)], mini_batch_size)
net.SGD(training_data, 60, mini_batch_size, 0.1,validation_data, test_data)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages