Skip to content

Instantly share code, notes, and snippets.

View agarwalnaimish's full-sized avatar

Naimish Agarwal agarwalnaimish

View GitHub Profile
"""
Example to create a neural network with one hidden layer for solving the classical XOR problem.
Based on the lua code at
https://github.com/torch/nn/blob/master/doc/training.md
@author: Naimish Agarwal
@dependencies: python 2.7, torch 7

Using Torch in Atom

Install Atom from https://atom.io or with brew cask install atom

Then install packages (example apm install hydrogen, apm is a package manager for atom):

  • hydrogen
  • autocomplete-paths
  • language-lua

Install Visual Studio 12.0

Theano requires its compiler.

Install CUDA

Just download GUI installer from NVIDIA and install it.

After installation you might want to try out some examples.

They are typically in C:\ProgramData\NVIDIA Corporation\CUDASamples\Vx.x\Bin\win64\Release\

from keras.models import Sequential
from keras.layers.core import Dense, Dropout, Activation, Flatten
from keras.layers.convolutional import Convolution2D, MaxPooling2D
from keras.layers.normalization import BatchNormalization
#AlexNet with batch normalization in Keras
#input image is 224x224
model = Sequential()
model.add(Convolution2D(64, 3, 11, 11, border_mode='full'))
@agarwalnaimish
agarwalnaimish / readme.md
Created June 4, 2016 16:27 — forked from baraldilorenzo/readme.md
VGG-19 pre-trained model for Keras

##VGG19 model for Keras

This is the Keras model of the 19-layer network used by the VGG team in the ILSVRC-2014 competition.

It has been obtained by directly converting the Caffe model provived by the authors.

Details about the network architecture can be found in the following arXiv paper:

Very Deep Convolutional Networks for Large-Scale Image Recognition

K. Simonyan, A. Zisserman