(data, op)
| 10 | } |
| 11 | |
| 12 | function 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 | |
| 23 | function testBitwiseAdam(data, op) { |
| 24 | let net = new brain.NeuralNetwork(); |
no test coverage detected