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
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)