Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
INDIR=$1
OUTDIR=$2
echo "Cloning leveldb in ${INDIR} to ${OUTDIR}"
INPATH=`realpath ${INDIR}`
mkdir -p ${OUTDIR}
sshput () {
RSAKEY="${HOME}/.ssh/id_rsa.pub"
DSAKEY="${HOME}/.ssh/id_dsa.pub"
if [ $# -eq 2 ]; then
KEY=$1
if [ ! -r $KEY ]
then
echo "'$KEY' does not exist or is not readable"
return 1
@jeffdonahue
jeffdonahue / alexnet_dummydata_nolrn.prototxt
Created November 11, 2015 01:24
AlexNet with no LRNs and dummy data, for comparison with TensorFlow
layer {
name: "data"
type: "DummyData"
top: "data"
top: "label"
dummy_data_param {
shape { dim: [128, 3, 227, 227] }
shape { dim: [128] }
}
}
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# Either wget or curl is required.
# It's assumed that a C/C++ compiler are installed.
# exit on error
set -e
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
# create our directories
#!/usr/bin/env python
# usage: python count_caffemodel_params.py /path/to/my.caffemodel [/path/to/my/other.caffemodel, ...]
from caffe.proto import caffe_pb2
import sys
assert len(sys.argv) >= 2
for caffemodel_filename in sys.argv[1:]:
import numpy as np
def canonical_axis(x, axis):
def is_int_ndarray(x):
if not isinstance(x, np.ndarray):
return False
dtype = str(x.dtype)
prefixes = 'int', 'uint'
return any(dtype.startswith(p) for p in prefixes)
if axis is None:
#!/usr/bin/env bash
set -e
set -x
GPU=0
CWD=$(pwd)
CAFFE_DIR=/raid/jdonahue/philkr-caffe
MAGIC_DIR=~/magic_init
CLASS_DIR=/raid/jdonahue/voc-classification
#!/bin/bash
set -x
set -e
export LD_LIBRARY_PATH='/usr/local/cuda/lib64/'
export PYTHONUNBUFFERED="True"
NAME="scratch"
NAME="/tmp/magic_caffenet.caffenet"
if [ "$#" -ge 1 ]; then
NAME=${2}
net: "train_val.prototxt"
test_iter: 736
test_interval: 1000000 # py solving tests
display: 1
average_loss: 100
# lr_policy: "fixed"
lr_policy: "step"
stepsize: 50000
gamma: 0.1
# base_lr: 1e-4