Skip to content

Instantly share code, notes, and snippets.

View masonwang513's full-sized avatar

Gaige Wang masonwang513

  • ZWEEC
  • Singapore
View GitHub Profile
@masonwang513
masonwang513 / googlenet.py
Created January 28, 2018 08:10 — forked from joelouismarino/googlenet.py
GoogLeNet in Keras
from scipy.misc import imread, imresize
from keras.layers import Input, Dense, Convolution2D, MaxPooling2D, AveragePooling2D, ZeroPadding2D, Dropout, Flatten, merge, Reshape, Activation
from keras.models import Model
from keras.regularizers import l2
from keras.optimizers import SGD
from googlenet_custom_layers import PoolHelper,LRN
def create_googlenet(weights_path=None):
@masonwang513
masonwang513 / CaffeBatchPrediction.cpp
Created December 2, 2017 08:28 — forked from erogol/CaffeBatchPrediction.cpp
Caffe c++ batch based prediction
#include "caffeclassifier.h"
CaffeClassifier::CaffeClassifier(const string& model_file,
const string& trained_file,
const string& mean_file,
const string& label_file,
const bool use_GPU,
const int batch_size) {
if (use_GPU)
Caffe::set_mode(Caffe::GPU);