This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Author: Kyle Kastner | |
| # License: BSD 3-clause | |
| # THEANO_FLAGS="optimizer=None,compute_test_value=raise" python tanh_rnn.py | |
| import numpy as np | |
| import theano | |
| import theano.tensor as T | |
| from scipy import linalg | |
| class sgd(object): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # skip hidden files and sed replace | |
| find . -not -path '*/\.*' -type f -exec sed -i -e 's|from pelican|from ../lib/pelican|' {} + | |
| # replace in every file recursive | |
| find . -type f -exec sed -i -e 's/foo/bar/g' {} + | |
| # replace in all files in current dir | |
| sed -i -- 's/foo/bar/g' * | |
| # tmp_wav.txt is raw text from dropbox downloads list - pull out wav files, making sure to strip leading whitespace |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| # Broadcast tricks to repeat a matrix | |
| a = np.arange(100 * 10).reshape((100, 10)) | |
| # Number of times to clone each entry | |
| clone_count = 2 | |
| # axis 0 clone | |
| b = np.ones((1, clone_count, a.shape[1])) | |
| c = (a[:, None, :] * b).reshape((-1, a.shape[-1])) | |
| # axis 1 clone |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| ''' | |
| Pure Python implementation of some numerical optimizers | |
| Created on Jan 21, 2011 | |
| @author Jiahao Chen | |
| ''' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from scipy.linalg import svd | |
| from scipy.io import wavfile | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| from numpy.lib.stride_tricks import as_strided | |
| import theano | |
| import os | |
| try: | |
| import urllib.request as urllib # for backwards compatibility | |
| except ImportError: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| from scipy import linalg | |
| from sklearn.externals import joblib | |
| mem = joblib.Memory(cachedir='.') | |
| def plot_gp_confidence(gp, show_gp_points=True, X_low=-1, X_high=1, | |
| X_count=1000, xlim=None, ylim=None, show=False): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Stacked LSTMs | |
| # Author: Kyle Kastner | |
| # Based on script from /u/siblbombs | |
| # License: BSD 3-Clause | |
| import tensorflow as tf | |
| from tensorflow.models.rnn import rnn | |
| from tensorflow.models.rnn.rnn_cell import LSTMCell | |
| import numpy as np | |
| import time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Author: Kyle Kastner | |
| # License: BSD 3-clause | |
| # Based on example blog from | |
| # http://kawahara.ca/matlab-jaccard-similarity-coefficient-between-images/ | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| def _check_01(arr): | |
| """ |