Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function(callback) {
async.auto({
"activate": function(callback) {
i1.activate(data[0].inputs[0], function(error, signal) {
expect(error).to.be.null
expect(signal).to.be.a("number")
expect(signal).to.be.equal(data[0].inputs[0])
callback(error, signal)
})
},
"forward": ["activate", function(results, callback) {
i1.forward(results.activate, callback)
}]
}, callback)
},
function(callback) {
let weights = function(callback) {
let weights = function(neuron, callback) {
neuron.weights(function(error, weights) {
callback(error, "I: " + weights.incoming + "; O: " + weights.outgoing)
})
}
async.auto({
"inputs": function(callback) {
async.map(i, weights, callback)
},
"neuron": function(callback) {
weights(n, callback)
}
}, callback)
}
let outputs = function(callback) {