Skip to content

Instantly share code, notes, and snippets.

View p-i-'s full-sized avatar

Pi p-i-

View GitHub Profile
using Complex = std::complex<float>;
class FormantFilter {
float a1, a2, yPrev, yPrevPrev;
public:
float out;
FormantFilter(float freq, float bandwidth, float sampleRate, float gainDB)
{
using Complex = std::complex<float>;
class FormantFilter {
float a1, a2, yPrev, yPrevPrev;
public:
float out;
FormantFilter(float freq, float bandwidth, float sampleRate, float gainDB)
{
using Complex = std::complex<float>;
struct Formant {
private:
float freq, bandwidth, gain_db, sampleRate;
float a1, a2, b0;
float yPrev, yPrevPrev;
public:
"""Implements Assignment 3 for Geoffrey Hinton's Neural Networks Course offered through Coursera.
* (Batch)Trains a simple Feedforward Neural Network with Backpropogation, for recognizing USPS handwritten digits.
* Assignment looks into efficient optimization, and into effective regularization.
* Recognizes USPS handwritten digits.
Abstracts classifiers developed in the course into, a more pythonic Sklearn framework. And cleans up a lot of the
given code.
* NOTE Matrix sizes are given as <y> <x> i.e. <#rows> <#cols>
"""Implements Assignment 3 for Geoffrey Hinton's Neural Networks Course offered through Coursera.
* (Batch)Trains a simple Feedforward Neural Network with Backpropogation, for recognizing USPS handwritten digits.
* Assignment looks into efficient optimization, and into effective regularization.
* Recognizes USPS handwritten digits.
Abstracts classifiers developed in the course into, a more pythonic Sklearn framework. And cleans up a lot of the
given code.
* NOTE Matrix sizes are given as <y> <x> i.e. <#rows> <#cols>
@p-i-
p-i- / backprop.py
Last active September 18, 2016 17:06
"""Implements Assignment 3 for Geoffrey Hinton's Neural Networks Course offered through Coursera.
* (Batch)Trains a simple Feedforward Neural Network with Backpropogation, for recognizing USPS handwritten digits.
* Assignment looks into efficient optimization, and into effective regularization.
* Recognizes USPS handwritten digits.
Abstracts classifiers developed in the course into, a more pythonic Sklearn framework. And cleans up a lot of the
given code.
* NOTE Matrix sizes are given as <y> <x> i.e. <#rows> <#cols>
% Version 1.000
%
% Code provided by Ruslan Salakhutdinov
%
% Permission is granted for anyone to copy, use, modify, or distribute this
% program and accompanying programs and documents for any purpose, provided
% this copyright notice is retained and prominently displayed, along with
% a note saying that the original programs are available from our
% web page.
% The programs and documents are distributed without any warranty, express or
function [pd, sample] = softMax( inputs, weights, biases )
nOutputs = size( biases, 2 );
batchSize = size( inputs, 1 );
z = inputs * weights + repmat( biases, batchSize, 1 );
expZ = exp( z );
%pd = expZ ./ ( sum(expZ,2) * ones(1,nOutputs) );
pd = expZ ./ repmat( sum(expZ,2), 1, nOutputs );
for epoch = 1 : maxepoch
%%% Do Conjugate Gradient Optimization
fprintf( 1, 'epoch %d, batch: ', epoch );
randomBatch = randperm(600);
for b = 1 : nBatches_train/100, % do 100 batches at a go
fprintf(1, ' %d', b);
data = zeros(10000,neurons0);
pd2_all = zeros(10000,neurons2);

HowTo for installing bleeding-edge (a.k.a. Nightly/Master) Juno

A Guide for (other) idiots

This guide is for you if:

  • you wish to understand how Juno works under the hood
  • you like taking things apart, tinkering, and putting them back together
  • you want to be on the bleeding edge build, why?
  • if you report bugs the devs will like you more