This is a static copy of a profile report

Home

Function details for maxpoolingThis is a static copy of a profile report

Home

maxpooling (Calls: 2595, Time: 410.481 s)
Generated 19-Jun-2021 04:01:57 using performance time.
function in file /nfs/inm_phd/07/d07944009/2021/0618-proj6/simpleNN/MATLAB/cnn/maxpooling.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
feedforwardfunction1947
Jvfunction648
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
10
Z = Z(P, :);
2595202.281 s49.3%
19
idx_pool = P(max_id);
2595102.241 s24.9%
13
[Z, max_id] = max(Z);
259555.846 s13.6%
25
R_Z = reshape(R_Z(idx), d, [])...
64835.595 s8.7%
26
end
25958.180 s2.0%
All other lines  6.339 s1.5%
Totals  410.481 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
gpufunction32430.268 s0.1%
Self time (built-ins, overhead, etc.)  410.213 s99.9%
Totals  410.481 s100% 
Code Analyzer results
Line numberMessage
18If you intend to specify expression precedence, use parentheses () instead of brackets [].
24If you intend to specify expression precedence, use parentheses () instead of brackets [].
Coverage results
Show coverage for parent directory
Total lines in function26
Non-code lines (comments, blank lines)7
Code lines (lines that can run)19
Code lines that did run19
Code lines that did not run0
Coverage (did run/can run)100.00 %
Function listing
time 
Calls 
 line
   1 
function [Z, idx_pool, R_Z] = maxpooling(model, net, Zin, m, R_Zin)
   2 

  0.007 
   2595 
   3
a = model.ht_conv(m); 
  0.004 
   2595 
   4
b = model.wd_conv(m); 
  0.004 
   2595 
   5
d = model.ch_input(m+1); 
  0.003 
   2595 
   6
h = model.wd_subimage_pool(m); 
   7 

  0.016 
   2595 
   8
P = net.idx_phiZ_pool{m}; 
  0.074 
   2595 
   9
Z = reshape(Zin, d*a*b, []); 
 202.281 
   2595 
  10
Z = Z(P, :); 
  0.090 
   2595 
  11
Z = reshape(Z, h*h, []); 
  12 

 55.846 
   2595 
  13
[Z, max_id] = max(Z); 
  0.092 
   2595 
  14
Z = reshape(Z, d, []); 
  15 

  0.018 
   2595 
  16
outa = model.ht_input(m+1); 
  0.004 
   2595 
  17
outb = model.wd_input(m+1); 
  3.950 
   2595 
  18
max_id = reshape(max_id, d*outa*outb, []) + h*h*gpu([0:d*outa*outb-1])'; 
 102.241 
   2595 
  19
idx_pool = P(max_id); 
  20 

  0.294 
   2595 
  21
if exist('R_Zin', 'var') 
  0.016 
    648 
  22
	R_Z = reshape(R_Zin, d*a*b, []); 
  23 

  1.712 
    648 
  24
	idx = idx_pool + gpu([0:size(max_id, 2)-1])*d*a*b; 
 35.595 
    648 
  25
	R_Z = reshape(R_Z(idx), d, []); 
  8.180 
   2595 
  26
end 

Other subfunctions in this file are not included in this listing.