This file contains 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 collections import defaultdict | |
import h5py, numpy | |
class HDF5Matrix: | |
refs = defaultdict(int) | |
def __init__(self, datapath, dataset, start, end, normalizer=None): | |
if datapath not in self.refs.keys(): | |
f = h5py.File(datapath) | |
self.refs[datapath] = f |
This file contains 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 | |
x = np.random.rand(513) | |
# Converting to the frequency domain | |
X = np.fft.rfft(x) | |
# Taking the log of the magnitude and converting back to rectangular | |
def P2R(magnitude, phase): |
This file contains 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
fAed cBAG|BBBB gBeB|d2 BD E2 cB|[1cBAF G2 Bc:|[2B2 Bd e3G| | |
dcde fab2|afef g2 fg|affe fedB|GEDB E3 :| |
This file contains 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
--- | |
# My First Slidify Deck | |
by Joao Felipe Santos | |
--- | |
### Slide 1 | |
This is an unordered list |
This file contains 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
<!DOCTYPE html> | |
<!-- | |
Google HTML5 slide template | |
Authors: Luke Mah?? (code) | |
Marcin Wichary (code and design) | |
Dominic Mazzoni (browser compatibility) | |
Charles Chen (ChromeVox support) |
This file contains 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
@article{Lord1994, | |
abstract = {Describes the Autism Diagnostic Interview-Revised (ADI-R), a revision of the Autism Diagnostic Interview, a semistructured, investigator-based interview for caregivers of children and adults for whom autism or pervasive developmental disorders is a possible diagnosis. The revised interview has been reorganized, shortened, modified to be appropriate for children with mental ages from about 18 months into adulthood and linked to ICD-10 and DSM-IV criteria. Psychometric data are presented for a sample of preschool children.}, | |
author = {Lord, C and Rutter, M and {Le Couteur}, A}, | |
issn = {0162-3257}, | |
journal = {Journal of autism and developmental disorders}, | |
keywords = {Algorithms,Autistic Disorder,Autistic Disorder: classification,Autistic Disorder: diagnosis,Autistic Disorder: psychology,Caregivers,Caregivers: psychology,Child,Female,Humans,Intellectual Disability,Intellectual Disability: classification,Intellectual Disability: diagnosis,Intellectual Disability: psychology,Intervie |
This file contains 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
creating an lstm with 2 layers | |
setting forget gate biases to 1 in LSTM layer 1 | |
setting forget gate biases to 1 in LSTM layer 2 | |
number of parameters in the model: 240321 | |
cloning rnn | |
cloning criterion | |
/Users/jfsantos/torch/install/bin/luajit: /Users/jfsantos/torch/install/share/lua/5.1/nn/Identity.lua:13: bad argument #1 to 'set' (expecting number or Tensor or Storage at /tmp/luarocks_torch-scm-1-8315/torch7/generic/Tensor.c:1089) | |
stack traceback: | |
[C]: in function 'set' | |
/Users/jfsantos/torch/install/share/lua/5.1/nn/Identity.lua:13: in function 'func' |
This file contains 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
% shepardtones.m - plays the shepard tones | |
% based on an example I found here: http://hebb.mit.edu/courses/9.29/2003/athena/auditory/matlab/shepardtones.m | |
% adjustable parameters | |
max_time = 2; % time for each tone | |
max_repeat = 3; % number of loops | |
A = 440; % "base frequency" | |
num_harm = 7; % number of harmonics used for each tone | |
sigmasq = 1; % variance of the amplitude for each partial |
This file contains 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
signal = require "signal" | |
complex = require "signal.complex" | |
function istft(X, win, hop) | |
local x = torch.zeros((X:size(1)-1)*hop + win) | |
framesamp = X:size(2) | |
hopsamp = hop | |
for n=1,X:size(1) do | |
i = 1 + (n-1)*hopsamp | |
print(i, i + framesamp - 1) |
This file contains 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
model = nn.Sequential() | |
lstm = nn.Sequencer( | |
nn.Sequential() | |
:add(nn.LSTM(nFeatures,nHidden)) | |
:add(nn.Dropout()) | |
:add(nn.LSTM(nHidden,nHidden)) | |
) | |
lstm:remember('neither') -- force model to call forget at each call to forward |