MCPcopy Index your code
hub / github.com/BrainJS/brain.js / testBitwise

Function testBitwise

test/base/bitwise.js:12–21  ·  view source on GitHub ↗
(data, op)

Source from the content-addressed store, hash-verified

10}
11
12function testBitwise(data, op) {
13 let net = new brain.NeuralNetwork();
14 let res = net.train(data, { errorThresh: 0.003 });
15
16 data.forEach(d => {
17 var actual = net.run(d.input);
18 var expected = d.output;
19 assert.ok(isAround(actual[0], expected[0]), `failed to train "${op}" - expected: ${expected}, actual: ${actual}`);
20 });
21}
22
23function testBitwiseAdam(data, op) {
24 let net = new brain.NeuralNetwork();

Callers 1

bitwise.jsFile · 0.70

Calls 3

trainMethod · 0.95
runMethod · 0.95
isAroundFunction · 0.85

Tested by

no test coverage detected