Skip to content

Instantly share code, notes, and snippets.

View ebenolson's full-sized avatar

Eben Olson ebenolson

  • Presco Engineering
  • Woodbridge, CT
View GitHub Profile
import numpy as np
import theano
import theano.tensor as T
X = T.tensor3()
W = theano.shared(np.ones((1,1,1,3)).astype('float32'))
W_shape = (1, 1, 1, 3)
input = X
Subtensor{::, ::, int64:int64:} [@A] ''
|InplaceDimShuffle{0,1,3} [@B] ''
| |ConvOp{('imshp', (1, 1, 8)),('kshp', (1, 3)),('nkern', 1),('bsize', 1),('dx', 1),('dy', 1),('out_mode', 'full'),('unroll_batch', None),('unroll_kern', None),('unroll_patch', True),('imshp_logical', (1, 1, 8)),('kshp_logical', (1, 3)),('kshp_logical_top_aligned', True)} [@C] ''
| |InplaceDimShuffle{0,1,x,2} [@D] ''
| | |Subtensor{::, ::, int64:int64:} [@E] ''
| | |InplaceDimShuffle{0,1,3} [@F] ''
| | | |ConvOp{('imshp', (1, 1, 8)),('kshp', (1, 3)),('nkern', 1),('bsize', 1),('dx', 1),('dy', 1),('out_mode', 'full'),('unroll_batch', None),('unroll_kern', None),('unroll_patch', True),('imshp_logical', (1, 1, 8)),('kshp_logical', (1, 3)),('kshp_logical_top_aligned', True)} [@G] ''
| | | |InplaceDimShuffle{0,1,x,2} [@H] ''
| | | | |Subtensor{::, ::, int64:int64:} [@I] ''
@ebenolson
ebenolson / preseed.cfg
Created October 14, 2015 18:00
packer ubuntu 14.04 esxi
choose-mirror-bin mirror/http/proxy string
d-i base-installer/kernel/override-image string linux-server
d-i clock-setup/utc boolean true
d-i clock-setup/utc-auto boolean true
d-i finish-install/reboot_in_progress note
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
d-i partman-auto-lvm/guided_size string max
d-i partman-auto/choose_recipe select atomic
d-i partman-auto/method string lvm
@ebenolson
ebenolson / prebuilt_startup.sh
Last active November 10, 2015 00:26
gpu demo box setup.sh
#!/bin/bash
cd ~/pydata2015
git pull
source ~/miniconda2/bin/activate py27
# register with landing page
curl --form ip="`curl http://169.254.169.254/latest/meta-data/public-ipv4`" http://pydata.ebenolson.com/addip
# start notebook server
ipython notebook --ip="*"
@ebenolson
ebenolson / Dockerfile
Created November 9, 2015 17:23
openslide dockerfile
FROM ubuntu:trusty
########################################
#
# openslide 3.4.1 image based on Ubuntu:trusty
#
#######################################
# Set Locale
import theano, numpy
from theano import tensor as T
import lasagne
#fake data, same shapes
train_in = numpy.zeros((100,46,30)).astype('float32')
train_out = numpy.zeros((100,46)).astype('int32')
mask_train = numpy.zeros((100,46)).astype('float32')
input_var = T.tensor3('input_var')
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# Context manager to generate batches in the background via a process pool
# Usage:
#
# def batch(seed):
# .... # generate minibatch
# return minibatch
#
# with BatchGenCM(batch) as bg:
# minibatch = next(bg)
# .... # do something with minibatch
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.