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: 1962, Time: 306.131 s)
Generated 19-Jun-2021 04:39:10 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
feedforwardfunction1962
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
10
Z = Z(P, :);
1962156.206 s51.0%
19
idx_pool = P(max_id);
196287.829 s28.7%
13
[Z, max_id] = max(Z);
196255.887 s18.3%
18
max_id = reshape(max_id, d*out...
19623.315 s1.1%
26
end
19622.460 s0.8%
All other lines  0.433 s0.1%
Totals  306.131 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
gpufunction19620.171 s0.1%
Self time (built-ins, overhead, etc.)  305.960 s99.9%
Totals  306.131 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 run16
Code lines that did not run3
Coverage (did run/can run)84.21 %
Function listing
time 
Calls 
 line
   1 
function [Z, idx_pool, R_Z] = maxpooling(model, net, Zin, m, R_Zin)
   2 

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

  0.010 
   1962 
   8
P = net.idx_phiZ_pool{m}; 
  0.046 
   1962 
   9
Z = reshape(Zin, d*a*b, []); 
 156.206 
   1962 
  10
Z = Z(P, :); 
  0.058 
   1962 
  11
Z = reshape(Z, h*h, []); 
  12 

 55.887 
   1962 
  13
[Z, max_id] = max(Z); 
  0.056 
   1962 
  14
Z = reshape(Z, d, []); 
  15 

  0.013 
   1962 
  16
outa = model.ht_input(m+1); 
  0.003 
   1962 
  17
outb = model.wd_input(m+1); 
  3.315 
   1962 
  18
max_id = reshape(max_id, d*outa*outb, []) + h*h*gpu([0:d*outa*outb-1])'; 
 87.829 
   1962 
  19
idx_pool = P(max_id); 
  20 

  0.199 
   1962 
  21
if exist('R_Zin', 'var') 
  22 
	R_Z = reshape(R_Zin, d*a*b, []);
  23 

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

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