Skip to content

Commit a82faba

Browse files
Merge pull request #261 from BrainJS/260-error-rate
fix: Error rate scale
2 parents a40d989 + 425d41b commit a82faba

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

browser.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* license: MIT (http://opensource.org/licenses/MIT)
77
* author: Heather Arthur <[email protected]>
88
* homepage: https://github.com/brainjs/brain.js#readme
9-
* version: 1.2.5
9+
* version: 1.2.6
1010
*
1111
* acorn:
1212
* license: MIT (http://opensource.org/licenses/MIT)
@@ -4102,7 +4102,7 @@ var RNN = function () {
41024102
}
41034103

41044104
this.totalCost = cost;
4105-
return Math.pow(2, log2ppl / (max - 1));
4105+
return Math.pow(2, log2ppl / (max - 1)) / 100;
41064106
}
41074107

41084108
/**

browser.min.js

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/recurrent/rnn.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/recurrent/rnn.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "brain.js",
33
"description": "Neural network library",
4-
"version": "1.2.5",
4+
"version": "1.2.6",
55
"author": "Heather Arthur <[email protected]>",
66
"repository": {
77
"type": "git",

src/recurrent/rnn.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ export default class RNN {
230230
}
231231

232232
this.totalCost = cost;
233-
return Math.pow(2, log2ppl / (max - 1));
233+
return Math.pow(2, log2ppl / (max - 1)) / 100;
234234
}
235235

236236
/**

test/recurrent/rnn-time-step.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ describe('RNNTimeStep', () => {
9797
it('can learn to predict forwards and backwards', () => {
9898
const net = new LSTMTimeStep({
9999
inputSize: 1,
100-
hiddenLayers: [20, 5, 1],
100+
hiddenLayers: [20],
101101
outputSize: 1
102102
});
103103

0 commit comments

Comments
 (0)