Open morungos opened 6 years ago
I found what seems to be a typo that is breaking standalone generated output. Basically, the generated function ignores the input entirely. There aren't even any references to it in the generated code.
The culprit seems to be: https://github.com/cazala/synaptic/blob/master/src/Network.js#L430
Current code:
for (var i = 0; i < data.inputs; i++) activation += 'F[' + data.inputs[i] + '] = input[' + i + '];\n';
Should probably read:
for (var i = 0; i < data.inputs.length; i++) activation += 'F[' + data.inputs[i] + '] = input[' + i + '];\n';
i.e., don't use the array as if it's an integer in loop condition.
The effect of this, at least for me in Node.js, is to omit all initialization from input.
input
I found what seems to be a typo that is breaking standalone generated output. Basically, the generated function ignores the input entirely. There aren't even any references to it in the generated code.
The culprit seems to be: https://github.com/cazala/synaptic/blob/master/src/Network.js#L430
Current code:
Should probably read:
i.e., don't use the array as if it's an integer in loop condition.
The effect of this, at least for me in Node.js, is to omit all initialization from
input
.