Skip to content

Instantly share code, notes, and snippets.

@curiousily
Created July 16, 2019 19:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save curiousily/d5b11dacfc981c98ec774ad9eca2f3cb to your computer and use it in GitHub Desktop.
Save curiousily/d5b11dacfc981c98ec774ad9eca2f3cb to your computer and use it in GitHub Desktop.
const sigmoidPerceptron = ({ x, w, bias }) => {
const product = tf.dot(x, w).dataSync()[0];
return tf.sigmoid(product + bias).dataSync()[0];
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment