Advertisement
Guest User

Untitled

a guest
Aug 20th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.91 KB | None | 0 0
  1. double* ConvLayer::calculate()
  2. {
  3.  
  4.         for(int img_width = 0; img_width < (m_ydim - m_inydim + 1); img_width++)
  5.                 for(int img_height = 0; img_height < (m_zdim - m_inzdim + 1); img_height++)
  6.                         for(int filter = 0; filter < m_kdim; filter++)
  7.                         {
  8.                                 double filt_tot = 0;
  9.                                 for(int filt_x = 0; filt_x < m_inxdim; filt_x++)
  10.                                         for(int filt_y = 0; filt_y < m_inydim; filt_y++)
  11.                                                 for(int filt_z = 0; filt_z < m_inzdim; filt_z++)
  12.                                                         filt_tot += get_value_us(m_input[filt_x][img_width + filt_y][img_height + filt_z] * m_weights[filter][filt_x][filt_y][filt_z]);
  13.                                 m_output[filter][img_width][img_height] = filt_tot;
  14.                         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement