Skip to content

Instantly share code, notes, and snippets.

@ashwani-rathee
Created December 17, 2020 03:38
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 ashwani-rathee/13e0ec746b99200bfb64f53b1e0732f6 to your computer and use it in GitHub Desktop.
Save ashwani-rathee/13e0ec746b99200bfb64f53b1e0732f6 to your computer and use it in GitHub Desktop.
Blog Post 1 Contents
inputs = [1.0, 2.0, 3.0]
weights1 = [0.2, 0.8, -0.5, 1.0]
weights2 = [0.5, -0.91, 0.26, -0.5]
bias1 = 2.0
bias2 = 3.0
output = [inputs[1]*weights1[1] + inputs[2]*weights1[2] + inputs[3]*weights1[3] + inputs[4]*weights1[4] + bias1,
inputs[1]*weights2[1] + inputs[2]*weights2[2] + inputs[3]*weights2[3] + inputs[4]*weights2[4] + bias2]
println(output)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment