Skip to content

Instantly share code, notes, and snippets.

View bearpaw's full-sized avatar

Wei Yang bearpaw

View GitHub Profile
@bearpaw
bearpaw / notebook.sh
Last active March 9, 2017 05:46 — forked from yangj1e/notebook.sh
Deploy Jupyter Notebook server
#!/usr/bin/env bash
cd ~
wget https://repo.continuum.io/archive/Anaconda2-4.3.0-Linux-x86_64.sh
bash Anaconda2-4.3.0-Linux-x86_64.sh -b
echo 'PATH="/home/ubuntu/anaconda2/bin:$PATH"' >> .bashrc
. .bashrc
jupyter notebook --generate-config
@bearpaw
bearpaw / train.log
Created August 23, 2016 00:53
hg -mean train val log
acc epoch loss LR
0.1052 1 0.019193 0.00025
0.3969 2 0.003348 0.00025
0.5235 3 0.002922 0.00025
0.5888 4 0.002697 0.00025
0.6230 5 0.002564 0.00025
0.6526 6 0.002433 0.00025
0.6769 7 0.002321 0.00025
0.6956 8 0.002223 0.00025
0.7057 9 0.002167 0.00025
@bearpaw
bearpaw / redshift.conf
Created June 3, 2016 11:59 — forked from bcomnes/redshift.conf
My configuration file for Redshift. Place it in ~/.config/ Drag redshift onto the Startup Applications menu to have it boot on start
; Global settings
[redshift]
temp-day=6500K
temp-night=5000
transition=1
;gamma=0.8:0.7:0.8
gamma=1.000:1.000:1.000
location-provider=geoclue
;location-provider=manual
adjustment-method=vidmode
@bearpaw
bearpaw / demo.m
Last active August 29, 2015 14:27
convert-matcaffe3-model-to-matcaffe
deploy_file = '/home/wyang/code/pose/chen-nips14-pose/external/my_models/lsp/lsp_deploy_conv_grabcut.prototxt';
weights_file = '/home/wyang/code/pose/chen-nips14-pose/cache/lsp/fully_conv_net_grabcut.caffemodel';
save_model_file = 'fully_conv_net_grabcut_matcaffe1.caffemodel';
% try
% % ------- Set params for old caffe model
% load('trans_params.mat');
% addpath('/home/wyang/code/caffe-xianjiec/matlab/caffe');
% set_weights(deploy_file, weights_file, trans_params, save_model_file);
Mean Pixel Chanel #1: 86.81
Mean Pixel Chanel #2: 76.52
Mean Pixel Chanel #3: 72.62
Training model using gpu id: 0
I0315 04:58:38.202831 26931 caffe.cpp:99] Use GPU with device ID 0
I0315 04:58:38.342545 26931 caffe.cpp:107] Starting Optimization
I0315 04:58:38.342646 26931 solver.cpp:32] Initializing solver from parameters:
test_iter: 100
test_interval: 5000
base_lr: 0.005
@bearpaw
bearpaw / dt.cpp
Created July 28, 2015 06:54
distance transform
/*-------------------------------------------------------------------------------------
* dt 1-d
* -----------------------------------------------------------------------------------*/
template <typename Dtype>
void MessagePassingLayer<Dtype>::dt1d(const Dtype *src, Dtype *dst, int *ptr, int step, int len,
Dtype a_c, Dtype b_c, Dtype a_p, Dtype b_p, Dtype dshift_c, Dtype dshift_p, int dlen) {
int *v = new int[len];
float *z = new float[len+1];
int k = 0;
name: "Clafifai"
# --------------------- Data Layer --------------------------
# input dimension is 36x36x3
layers {
name: "data"
type: DATA
top: "data"
top: "label"
data_param {
source: "cache/lsp/LMDB_train"
@bearpaw
bearpaw / Basic.md
Last active August 29, 2015 14:18
Ubuntu Basic Scripts
  1. 创建用户

    sudo adduser username
  2. 将用户添加到管理员用户组

    sudo adduser username sudo