Skip to content

Instantly share code, notes, and snippets.

View gustavla's full-sized avatar

Gustav Larsson gustavla

  • San Francisco, CA
View GitHub Profile
@gustavla
gustavla / gist:9499068
Created March 12, 2014 01:45
_isotonic.pyx
# Author: Nelle Varoquaux, Andrew Tulloch
# Uses the pool adjacent violators algorithm (PAVA), with the
# enhancement of searching for the longest decreasing subsequence to
# pool at each step.
import numpy as np
cimport numpy as np
cimport cython
from __future__ import division, print_function, absolute_import
import os
import struct
from array import array
import numpy as np
def load_mnist(section="training", offset=0, count=None, ret='xy',
x_dtype=np.float64, y_dtype=np.int64, path=None):
"""
@gustavla
gustavla / mnist.py
Created November 28, 2016 20:48
MNIST loader
from __future__ import division, print_function, absolute_import
import os
import struct
from array import array
import numpy as np
def load_mnist(section="training", offset=0, count=None, ret='xy',
x_dtype=np.float64, y_dtype=np.int64, path=None):
"""
@gustavla
gustavla / gist:ecf50d3730103beb9c30a306fd70d158
Last active January 17, 2020 03:33
PWC-Net train.prototxt
# use the same data augmentation scheme as the FlowNet2 paper
layer {
name: "img0"
type: "CustomData"
top: "img0"
top: "img1"
top: "flow_gt"
top: "aux"
include {
phase: TRAIN