Skip to content

Instantly share code, notes, and snippets.

View christopher-beckham's full-sized avatar

Christopher Beckham, PhD christopher-beckham

View GitHub Profile
<lasagne.layers.input.InputLayer object at 0x7fa6e38a95d0> (None, 3, 32, 32)
<lasagne.layers.conv.Conv2DLayer object at 0x7fa6e38a9950> (None, 64, 15, 15)
<lasagne.layers.normalization.BatchNormLayer object at 0x7fa6e38a9c50> (None, 64, 15, 15)
<lasagne.layers.special.NonlinearityLayer object at 0x7fa6e38b59d0> (None, 64, 15, 15)
<lasagne.layers.conv.Conv2DLayer object at 0x7fa6e38b5bd0> (None, 128, 7, 7)
<lasagne.layers.normalization.BatchNormLayer object at 0x7fa6e38b5ed0> (None, 128, 7, 7)
<lasagne.layers.special.NonlinearityLayer object at 0x7fa6e38404d0> (None, 128, 7, 7)
<lasagne.layers.conv.Conv2DLayer object at 0x7fa6e38406d0> (None, 192, 3, 3)
<lasagne.layers.normalization.BatchNormLayer object at 0x7fa6e38409d0> (None, 192, 3, 3)
<lasagne.layers.special.NonlinearityLayer object at 0x7fa6e3840f90> (None, 192, 3, 3)
@christopher-beckham
christopher-beckham / opfromgraph_test.py
Last active April 1, 2017 16:30
opfromgraph_doesnt_work_yet
import theano
from theano import tensor as T
from theano import OpFromGraph
import lasagne
from lasagne.layers import *
from lasagne.init import *
from lasagne.nonlinearities import *
from lasagne.objectives import *
from lasagne.updates import *
from lasagne.regularization import *
import theano
from theano import OpFromGraph
from theano import tensor as T
import numpy as np
import lasagne
from lasagne.layers import *
# suppose we have the network architecture:
# input -> conv1 -> conv2 -> dense
# and we want to make (conv1 -> conv2) a block
from lasagne.nonlinearities import *
from lasagne.layers import Layer
class SpatialSoftmaxLayer(Layer):
"""
Softmax layer that computes the softmax over pixels in the same location,
i.e., over the channel axis. This layer will automatically use the CuDNN
version of this softmax if it is available.
Parameters

Testing $x^2$

Dirs:

  • ssh - Contains scripts/data/etc. that should be scped onto remote machines such as Chris's cluster.
  • 22 - blah
digraph unix {
node [color=lightblue2, style=filled];
"node1" -> "node2"
"node3" -> "node2"
"node4" -> "node1"
}
@christopher-beckham
christopher-beckham / gist:accbf1da3a735e1de896
Last active August 29, 2015 14:01
Find consensus of .aln file
from sys import stdin
import sys
N = 10 # number of sequences
body = stdin.read()
body = body.split('\n')
body = body[3:len(body)-2]
final_body = []
for elem in body:
@christopher-beckham
christopher-beckham / gist:e8b239d71efb900c3e98
Last active August 29, 2015 14:01
Shit I never remember
def quicksort(arr):
if arr == []:
return []
if len(arr) == 1:
return arr
m = len(arr) / 2
pivot = arr[m]
less = [ arr[x] for x in range(0, len(arr)) if arr[x] <= pivot and x != m ]
greater = [ arr[x] for x in range(0, len(arr)) if arr[x] > pivot and x != m ]
return quicksort(less) + [pivot] + quicksort(greater)