question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Default settings do not change

See original GitHub issue

What is wrong?

I use setting, where itteration 99999 and errorTresh 0.0001, but I get default

Where does it happen?

node 10.15.2 (because if I use nodejs v12.16.2 I get error) brain.js 2.0.0-alpha.12 (in brain.js@1.2.2 i dont have this error)

How do we replicate the issue?

const brain = require('brain.js')
const config = {
  iterations: 99999,
  errorThresh: 0.0001,
  binaryThresh: 0.05,
  hiddenLayers: [8,8],
  activation: 'sigmoid',
  leakyReluAlpha: 0.01,
}
const net = new brain.NeuralNetwork(config)
var trainData = [{input: [0, 0], output: [0]},
                 {input: [0, 1], output: [1]},
                 {input: [1, 0], output: [1]},
                 {input: [1, 1], output: [0]}]
net.train(trainData)

const output = net.run([1, 0])
console.log(output) 
// Float32Array [ 0.6636456251144409 ]
console.log(net.train(trainData)) 
// { error: 0.1692930464156314, iterations: 20000 }

Expected behavior (i.e. solution)

In order for the settings to work, you probably need to use nodejs, but it gives an error.

Error: The module ‘/home/r/pr/nodeJS/Brain_2/node_modules/gl/build/Release/webgl.node’ was compiled against a different Node.js version using NODE_MODULE_VERSION 64. This version of Node.js requires NODE_MODULE_VERSION 72. Please try re-compiling or re-installing the module (for instance, using npm rebuild or npm install).

How important is this (1-5)?

5

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
robertleeplummerjrcommented, Aug 25, 2020

Fixed in beta 2. Ty for your help in finding this and fixing it!

1reaction
robertleeplummerjrcommented, Aug 13, 2020

Ah, ty for clarifying.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Top 9 Ways to Fix Unable to Change Default Programs in ...
That's why you are unable to change default apps. To remove the account, go to Settings > Accounts > Email & accounts. Click...
Read more >
Change the default settings for new documents
Open the template or a document based on the template whose default settings you want to change. · On the Format menu, click...
Read more >
The Default Tech Settings You Should Turn Off Right Away
The switches to toggle those settings off can be found by opening the settings menu and clicking on Privacy and security and then...
Read more >
Return iPhone settings to their defaults
On iPhone, return settings to their defaults without erasing your content.
Read more >
Reset Chrome settings to default
You can restore your browser settings in Chrome at any time. You might need to do this if apps or extensions you installed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found