Skip to content

Commit

Permalink
Bug fix: Misassigned learning rate (WebAssembly)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanRuta committed Mar 23, 2018
1 parent 86fcdb0 commit 374e026
Show file tree
Hide file tree
Showing 15 changed files with 23 additions and 18 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
#### Examples
- Added example project for loading jsNet through Webpack

#### Bug fixes
- WASM not training on some update functions, due to misassigned learning rate

# 3.3.0 - Misc Improvements
---
#### Network
Expand Down
7 changes: 4 additions & 3 deletions dev/js-WebAssembly/Network.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,11 @@ class Network {
switch (NetUtil.format(updateFn)) {

case "rmsprop":
this.learningRate = this.learningRate==undefined ? 0.001 : this.learningRate
this.learningRate = this.learningRate || 0.001
break

case "adam":
this.learningRate = this.learningRate==undefined ? 0.01 : this.learningRate
this.learningRate = this.learningRate || 0.01
break

case "adadelta":
Expand All @@ -175,6 +175,7 @@ class Network {

case "momentum":
NetUtil.defineProperty(this, "momentum", ["number"], [this.netInstance])
this.learningRate = this.learningRate || 0.2
this.momentum = momentum
break

Expand Down Expand Up @@ -738,7 +739,7 @@ class Network {
}

static get version () {
return "3.3.1"
return "3.3.3"
}
}

Expand Down
2 changes: 1 addition & 1 deletion dev/js/Network.js
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ class Network {
}

static get version () {
return "3.3.1"
return "3.3.3"
}
}

Expand Down
2 changes: 1 addition & 1 deletion dist/jsNetJS.concat.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/jsNetJS.concat.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/jsNetJS.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/jsNetJS.min.js.map

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions dist/jsNetWebAssembly.concat.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/jsNetWebAssembly.concat.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/jsNetWebAssembly.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/jsNetWebAssembly.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/mnist/mnist.html
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@
Module: Module,
layers: [
new InputLayer(784),
new FCLayer(100),
new FCLayer(100, {activation: "sigmoid"}),
new OutputLayer(10, {activation: false, softmax: true})
]
})
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jsnet",
"version": "3.3.2",
"version": "3.3.3",
"description": "Javascript based deep learning framework for basic and convolutional neural networks.",
"scripts": {
"test": "npm run js-tests && npm run wa-tests",
Expand Down
2 changes: 1 addition & 1 deletion test/js-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe("Loading", () => {
})

it("Statically returns the Network version when accessing via .version", () => {
expect(Network.version).to.equal("3.3.1")
expect(Network.version).to.equal("3.3.3")
})
})

Expand Down
2 changes: 1 addition & 1 deletion test/wa-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe("Loading", () => {
})

it("Statically returns the Network version when accessing via .version", () => {
expect(Network.version).to.equal("3.3.1")
expect(Network.version).to.equal("3.3.3")
})
})

Expand Down

0 comments on commit 374e026

Please sign in to comment.