Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mateogianolio committed Jun 7, 2015
1 parent 6cf6268 commit 1aa3730
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"text": "0123456789",
"training_set": 50000,
"text": "abcdefghijklmnopqrstuvwxyz",
"training_set": 20000,
"testing_set": 500,
"image_size": 16,
"threshold": 400,
"network": {
"hidden": 40,
"output": 10,
"output": 26,
"learning_rate": 0.03
}
}
Binary file modified examples/0123456789.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/abcdefghijklmnopqrstuvwxyz.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
config.fonts = config.fonts || ['serif', 'sans-serif'];
config.distortion = config.distortion === undefined ? true : config.distortion;
config.network.hidden = config.network.hidden || 40;
config.network.output = config.network.output || 8;
config.network.learning_rate = config.network.learning_rate || 0.1;

log('... done');
Expand Down Expand Up @@ -171,7 +172,7 @@

chunk = tools.center(chunk);

var output = Array.apply(null, new Array(10)).map(Number.prototype.valueOf, 0);
var output = Array.apply(null, new Array(config.network.output)).map(Number.prototype.valueOf, 0);
output[i] = 1;

if(index < config.training_set) {
Expand Down

0 comments on commit 1aa3730

Please sign in to comment.