Skip to content

Instantly share code, notes, and snippets.

View rakeshvar's full-sized avatar

rakeshvar rakeshvar

  • Stanford University
View GitHub Profile
@aelaguiz
aelaguiz / theano_softmax
Last active December 10, 2015 15:19
Equivalent straight numpy/python for Theanos softmax function
import numpy
import theano
import theano.tensor as T
def theano_softmax():
x = T.dmatrix('x')
_y = T.nnet.softmax(x)
f = theano.function([x], _y)
return f
@kastnerkyle
kastnerkyle / test_ctc.py
Last active October 11, 2015 03:42
Test of log-space CTC cost function
"""
bitmap utils and much of the ctc code modified from Shawn Tan
"""
# Author: Kyle Kastner
# License: BSD 3-clause
from theano import tensor
from scipy import linalg
import theano
import numpy as np
import matplotlib.pyplot as plt
@kastnerkyle
kastnerkyle / minibatch_ocr.py
Last active September 9, 2022 11:34
Minibatch OCR using modified CTC from Shawn Tan and Mohammad Pezeshki
"""
bitmap utils and much of the ctc code modified
From Shawn Tan, Rakesh and Mohammad Pezeshki
"""
# Author: Kyle Kastner
# License: BSD 3-clause
from theano import tensor
from scipy import linalg
import theano
import numpy as np