Advertisement
Trainlover08

Basic Neuron

Mar 17th, 2024 (edited)
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.55 KB | None | 0 0
  1. #include <numeric>
  2. #include <vector>
  3. #include <iostream>
  4.  
  5. float inputs1 [] = {};
  6. float inputs2 [] = {};
  7. float inputs3 [] = {};
  8.  
  9. float weights1 [] = {};
  10. float weights2 [] = {};
  11. float weights3 [] = {};
  12.  
  13. float bias1 = 3;
  14. float bias2 = 1;
  15. float bias3 = 2;
  16.  
  17. float output []=  {inputs1[0] * weights1[0] + inputs1[n] * weights1[n] + bias1} , {inputs2[0] * weights2[0] + inputs2[n] * weights2[n] + bias2} , {};
  18.  
  19.  
  20.     vector<int> v1 = {2, 3, 1};
  21.     vector<int> v2 = {4, 2, 5};
  22.  
  23.     int dotProduct = inner_product(v1.begin(), v1.end(), v2.begin(), 0);
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement