Skip to content

Instantly share code, notes, and snippets.

View zhongwen's full-sized avatar

Zhongwen Xu zhongwen

View GitHub Profile
@zhongwen
zhongwen / VGG_16_val.conf
Last active August 29, 2015 14:20
caffemodel converter for cxxnet, VGG-16
eval = val
iter = imginst
image_list = "imagenet/val.lst"
image_bin = "val.bin"
#mean_r=123.68
#mean_g=116.779
#mean_b=103.939
mean_value = 103.939,116.779,123.68
#no random crop and mirror in test
iter = end
{
"metadata": {
"name": "cuBLAS-no-PCA"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@zhongwen
zhongwen / cuBLAS.ipynb
Created June 4, 2014 19:45
cuBLAS speed test
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zhongwen
zhongwen / tmux.conf
Last active December 9, 2016 14:18 — forked from shinzui/tmux.conf
# ~/.tmux.conf
#
# See the following files:
#
# /opt/local/share/doc/tmux/t-williams.conf
# /opt/local/share/doc/tmux/screen-keys.conf
# /opt/local/share/doc/tmux/vim-keys.conf
#
# URLs to read:
#
@zhongwen
zhongwen / pegasos.py
Created February 16, 2014 06:13 — forked from alextp/pegasos.py
class OnlineLearner(object):
def __init__(self, **kwargs):
self.last_misses = 0.
self.iratio = 0.
self.it = 1.
self.l = kwargs["l"]
self.max_ratio = -np.inf
self.threshold = 500.
def hinge_loss(self, vector, cls, weight):
@zhongwen
zhongwen / eudist_sse.cc
Created November 2, 2012 18:25
Euclidean distance with SSE
static inline float euclidean_baseline_float(const int n, const float* x, const float* y){
float result = 0.f;
for(int i = 0; i < n; ++i){
const float num = x[i] - y[i];
result += num * num;
}
return result;
}
static inline float euclidean_intrinsic_float(int n, const float* x, const float* y){