This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn.grid_search import GridSearchCV | |
from sklearn.cross_validation import StratifiedKFold | |
def main(): | |
mnist = fetch_mldata("MNIST original") | |
X_all, y_all = mnist.data/255., mnist.target | |
print("scaling") | |
X = X_all[:60000, :] | |
y = y_all[:60000] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from sklearn.svm import SVC | |
from sklearn.svm import LinearSVC | |
from sklearn.linear_model.stochastic_gradient import SGDClassifier | |
from sklearn.datasets import fetch_mldata | |
from sklearn.utils import shuffle | |
import time | |
#out-of-core \ online | |
#http://scikit-learn.org/stable/auto_examples/applications/plot_out_of_core_classification.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "segnet" | |
layer { | |
name: "data" | |
type: "DenseImageData" | |
top: "data" | |
top: "label" | |
dense_image_data_param { | |
source: "/SegNet/CamVid/train.txt" # Change this to the absolute path to your data file | |
batch_size: 4 # Change this number to a batch size that will fit on your GPU |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <opencv2/opencv.hpp> | |
#include <vector> | |
using namespace cv; | |
using namespace std; | |
int main () { | |
Mat img = imread("lena.jpg"); | |
CascadeClassifier cascade; | |
if (cascade.load("haarcascade_frontalface_alt.xml")) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "VGG_ILSVRC_16_layers" | |
layer { | |
name: "train-data" | |
type: "Data" | |
top: "data" | |
top: "label" | |
include { | |
stage: "train" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author: Kyle Kaster | |
# License: BSD 3-clause | |
import numpy as np | |
def online_stats(X): | |
""" | |
Converted from John D. Cook | |
http://www.johndcook.com/blog/standard_deviation/ | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#To find function in headers | |
grep -n -r <function_name> <path_to_opencv_include_folder> | |
#To find function in libs | |
nm -C -A <path_to_opencv_lib_folder>/*.so | grep <function_name> | grep -v U | |
#Find package installed via apt-get | |
apt list --installed | grep <package_name> | |
#Find files related to package | |
dpkg -L <package_name> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "VGG_ILSVRC_16_layer" | |
layer { | |
name: "data" | |
type: "DenseImageData" | |
top: "data" | |
top: "label" | |
dense_image_data_param { | |
source: "/home/myuser/Downloads/SegNet/SegNet-Tutorial/CamVid/train.txt" # Change this to the absolute path to your data file | |
batch_size: 1 # Change this number to a batch size that will fit on your GPU | |
shuffle: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
A deep neural network with or w/o dropout in one file. | |
""" | |
import numpy | |
import theano | |
import sys | |
import math | |
from theano import tensor as T | |
from theano import shared |