MCPcopy Create free account
hub / github.com/BrainJS/brain.js / run

Method run

src/neural-network.js:192–204  ·  view source on GitHub ↗

* * @param input * @returns {*}

(input)

Source from the content-addressed store, hash-verified

190 * @returns {*}
191 */
192 run(input) {
193 if (!this.isRunnable) return null;
194 if (this.inputLookup) {
195 input = lookup.toArray(this.inputLookup, input);
196 }
197
198 let output = [...this.runInput(input)];
199
200 if (this.outputLookup) {
201 output = lookup.toHash(this.outputLookup, output);
202 }
203 return output;
204 }
205
206 /**
207 * trains via sigmoid

Callers 3

testBitwiseFunction · 0.95
testBitwiseAdamFunction · 0.95
testBitwiseAsyncFunction · 0.95

Calls 3

toArrayMethod · 0.80
toHashMethod · 0.80
runInputMethod · 0.45

Tested by

no test coverage detected