Skip to content

Commit

Permalink
A major change
Browse files Browse the repository at this point in the history
1. re-arrange optimizer module, fix bugs in `Adam`
2. add mint dataset
3. re-arrange util module
4. create more tests
  • Loading branch information
suquark committed Jan 30, 2017
1 parent 993a45c commit e602525
Show file tree
Hide file tree
Showing 56 changed files with 1,330 additions and 527 deletions.
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@

js/

test.html
test/
1 change: 0 additions & 1 deletion RL/helper/saving.json

This file was deleted.

23 changes: 23 additions & 0 deletions dataset/mnist_2000.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* 2000 gray images of size 28 * 28 in [0.0, 1.0]
* 0.0 - background, 1.0 - number
*/

import { mnist_xs } from 'dataset/mnist_raw2000.js';
export { mnist_xs as xs, mnist_ys as ys } from 'dataset/mnist_raw2000.js';

const size = 2000;
const dlength = mnist_xs.length / size;
function xs2vectors() {
let l = [];
for (let i = 0; i < mnist_xs.length; i += dlength) {
let arr = new Float32Array(dlength);
for (let j = 0; j < dlength; j++) {
arr[j] = mnist_xs[i+j];
}
l.push(arr);
}
return l;
}

export { xs2vectors };
46 changes: 46 additions & 0 deletions dataset/mnist_raw2000.js

Large diffs are not rendered by default.

Loading

0 comments on commit e602525

Please sign in to comment.