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
| ''' | |
| Created on Jun 16, 2015 | |
| @author: kashefy | |
| ''' | |
| import argparse | |
| import os | |
| def list_paths(root_path): |
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
| 2008_000002 | |
| 2008_000003 | |
| 2008_000007 | |
| 2008_000009 | |
| 2008_000016 | |
| 2008_000021 | |
| 2008_000026 | |
| 2008_000027 | |
| 2008_000032 | |
| 2008_000034 |
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 os | |
| def gen_paths(dir_src, func_filter=None): | |
| if func_filter is None: | |
| def func_filter(fileName): | |
| return True | |
| dst = [] | |
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
| name: "MNISTAutoencoderTiedWeights" | |
| layer { | |
| name: "mnist" | |
| type: "Data" | |
| top: "data" | |
| top: "label" | |
| include { | |
| phase: TRAIN | |
| } | |
| transform_param { |
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
| template <typename Dtype> | |
| void printMat(const Dtype* data, int rows, int cols) { | |
| int j = 0; | |
| std::cout<<"np.array(["; | |
| for (int r=0; r<rows; r++) { | |
| std::cout<<"["; | |
| for (int c=0; c<cols; c++) { | |
| std::cout<<data[j++]; | |
| if (c<cols-1) std::cout<<","; | |
| } |
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
| 1: aeroplane | |
| 2: bicycle | |
| 3: bird | |
| 4: boat | |
| 5: bottle | |
| 6: bus | |
| 7: car | |
| 8: cat | |
| 9: chair | |
| 10: cow |
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
| def is_wav(p): | |
| return os.path.splitext(p)[-1] == '.wav' | |
| def lower_samplerate_cmds(dir_src, samplerate, dir_dst, fpath_exec_script): | |
| paths = fs.gen_paths(dir_src, is_wav) | |
| commands = [] | |
| for fpath in paths: | |
| path_dst = os.path.join(dir_dst, os.path.basename(fpath)) |
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 | |
| def moving_avg(x, window_size): | |
| window = np.ones(int(window_size)) / float(window_size) | |
| return np.convolve(x, window, 'valid') |
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
| ./auditory-front-end/src/Processors/pitchProc.m:236: pObj.maxConfBuf = circVBuf(bufferDurSec*pObj.FsHzIn,1); | |
| ./auditory-front-end/src/Processors/pitchProc.m:237: pObj.maxConf = circVBufArrayInterface(pObj.maxConfBuf); | |
| ./auditory-front-end/src/Signals/circVBuf.m:1:classdef circVBuf < handle | |
| ./auditory-front-end/src/Signals/circVBuf.m:2: %circVBuf class defines a circular double buffered vector buffer | |
| ./auditory-front-end/src/Signals/circVBuf.m:51: % example 1 - loop over new vectors of a circVBuf (slow because of copy): | |
| ./auditory-front-end/src/Signals/circVBuf.m:52: % for ix=circVBufObj.VBuf.new:circVBuf.VBuf.lst | |
| ./auditory-front-end/src/Signals/circVBuf.m:53: % vec(:) = circVBuf.VBuf.raw(:,bId); | |
| ./auditory-front-end/src/Signals/circVBuf.m:57: % new = circVBuf.VBuf.new; | |
| ./auditory-front-end/src/Signals/circVBuf.m:58: % lst = circVBuf.VBuf.lst; | |
| ./auditory-front-end/src/Signals/circVBuf.m:59: % mean = mean(circVBuf.VBuf.raw(3:7,new:lst)); |
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
| ''' | |
| Created on Aug 18, 2017 | |
| @author: kashefy | |
| ''' | |
| import os | |
| import shutil | |
| import tensorflow as tf | |
| from tensorflow.examples.tutorials.mnist import input_data | |
| import numpy as np |
OlderNewer