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
sudo apt-get install gnome-devel | |
sudo apt-get install python3-dev | |
sudo apt-get install libcr-dev mpich mpich-doc | |
sudo apt-get install libncursesw5-dev ncurses-base ncurses-bin ncurses-term | |
sudo apt-get install gnome-devel python3-dev libcr-dev mpich mpich-doc libncursesw5-dev ncurses-base ncurses-bin ncurses-term | |
export PYTHON3PATH=`which python3` | |
export HOME_DIR=`pwd` |
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
sudo apt-get install gnome-devel | |
sudo apt-get install python3-dev | |
sudo apt-get install libcr-dev mpich mpich-doc | |
sudo apt-get install libncursesw5-dev ncurses-base ncurses-bin ncurses-term | |
sudo apt-get install gnome-devel python3-dev libcr-dev mpich mpich-doc libncursesw5-dev ncurses-base ncurses-bin ncurses-term | |
export PYTHON3PATH=`which python3` | |
export HOME_DIR=`pwd` |
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 |
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 tensorflow as tf | |
# adapted from https://stackoverflow.com/a/40029298/2466336 | |
if __name__ == '__main__': | |
path_to_events_file = '/home/kashefy/models/ae/log_simple_stats/2017-07-18_12-22-45/events.out.tfevents.1500373527.hobbes' | |
tag = 'mlp_layer-1/loss_classification_1' | |
# with open(fpath, "r") as f: | |
# | |
# |
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
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
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
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
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<<","; | |
} |
NewerOlder