Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double* ConvLayer::calculate()
- {
- for(int img_width = 0; img_width < (m_ydim - m_inydim + 1); img_width++)
- for(int img_height = 0; img_height < (m_zdim - m_inzdim + 1); img_height++)
- for(int filter = 0; filter < m_kdim; filter++)
- {
- double filt_tot = 0;
- for(int filt_x = 0; filt_x < m_inxdim; filt_x++)
- for(int filt_y = 0; filt_y < m_inydim; filt_y++)
- for(int filt_z = 0; filt_z < m_inzdim; filt_z++)
- 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]);
- m_output[filter][img_width][img_height] = filt_tot;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement