Skip to content

Instantly share code, notes, and snippets.

@Albertbol
Created March 12, 2021 06:29
Show Gist options
  • Save Albertbol/070efbc2f5482fa962a88471fa68889c to your computer and use it in GitHub Desktop.
Save Albertbol/070efbc2f5482fa962a88471fa68889c to your computer and use it in GitHub Desktop.
feedforward(inputArray) {
inputArray = this.normalize(inputArray)
const input = Matrix.fromArray(inputArray)
const hidden = this.calculateFF(
input,
this.weightsInputToHidden,
this.biasForHidden
)
const output = this.calculateFF(
hidden,
this.weightsHiddenToOutput,
this.biasForOutput
)
return { output, hidden, input }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment