Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1. //For initializing every weight in the current node
  2. for(int i = 0; i < HEIGHT; i++){   
  3.     for(int j = 0; j < WIDTH; j++){
  4.         //initial weight is the product of the two  
  5.         //pixel values
  6.         double initial_weight = training_image[image][row][col] * training_image[image][i][j];
  7.                        
  8.         network->node[row][col].weight[i][j] += initial_weight;
  9.  
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement