Skip to content

Instantly share code, notes, and snippets.

@mihikadutta
Last active March 30, 2019 04:14
Show Gist options
  • Select an option

  • Save mihikadutta/da5f5e7f6fb538d80bf17c7361e514c1 to your computer and use it in GitHub Desktop.

Select an option

Save mihikadutta/da5f5e7f6fb538d80bf17c7361e514c1 to your computer and use it in GitHub Desktop.
for (let i = 0; i < 50000; i++) {
...
...
const weightedSum = getWeightedInputSum(weights, input, bias);
const weightedSumWRTweight0 = input[0];
const weightedSumWRTweight1 = input[1];
const weightedSumWRTbias = 1;
const prediction = compose(
sigmoid,
identity
)(weightedSum);
const predictionWRTweightedSum = prediction * (1 - prediction);
const error = getError(prediction, target);
const errorWRTprediction = 2 * (prediction - target);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment