* * @param {Equation} equation * @param {Matrix} inputMatrix * @param {Matrix} previousResult * @param {Object} hiddenLayer * @returns {Matrix}
(equation, inputMatrix, previousResult, hiddenLayer)
| 86 | * @returns {Matrix} |
| 87 | */ |
| 88 | getEquation(equation, inputMatrix, previousResult, hiddenLayer) { |
| 89 | let relu = equation.relu.bind(equation); |
| 90 | let add = equation.add.bind(equation); |
| 91 | let multiply = equation.multiply.bind(equation); |
| 92 | |
| 93 | return relu( |
| 94 | add( |
| 95 | add( |
| 96 | multiply( |
| 97 | hiddenLayer.weight, |
| 98 | inputMatrix |
| 99 | ), |
| 100 | multiply( |
| 101 | hiddenLayer.transition, |
| 102 | previousResult |
| 103 | ) |
| 104 | ), |
| 105 | hiddenLayer.bias |
| 106 | ) |
| 107 | ); |
| 108 | } |
| 109 | |
| 110 | createInputMatrix() { |
| 111 | //0 is end, so add 1 to offset |
no test coverage detected