Skip to content

Instantly share code, notes, and snippets.

View neiodavince's full-sized avatar
😀

Sath Datla neiodavince

😀
View GitHub Profile
'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
- created cats/ and dogs/ subfolders inside train/ and validation/
- put the cat pictures index 0-999 in data/train/cats
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'))
# Target is to generate a graph file in gexf format (http://gexf.net/format) for Gephi
#-----------------------------------------------------
# STEP 1
# Generate nodes and edgelist from each email log file
#-----------------------------------------------------
setwd("C:/R")
# use sqldf for operations suited for db http://code.google.com/p/sqldf/
# Target is to generate a graph file in gexf format (http://gexf.net/format) for Gephi
#-----------------------------------------------------
# STEP 1
# Generate nodes and edgelist from each email log file
#-----------------------------------------------------
setwd("C:/R")
# use sqldf for operations suited for db http://code.google.com/p/sqldf/