This is a static copy of a profile report

Home

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

Home

feedforward (Calls: 654, Time: 922.700 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/feedforward.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
lossgrad_subsetfunction649
Jacobianfunction5
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
10
net.phiZ{m} = padding_and_phiZ...
1962457.897 s49.6%
14
[net.Z{m+1}, net.idx_pool{m}] ...
1962332.356 s36.0%
11
net.Z{m+1} = max(model.weight{...
1962131.892 s14.3%
25
net.Z{L+1} = model.weight{L}*n...
6540.426 s0.0%
4
net.Z{1} = reshape(gpu(data), ...
6540.072 s0.0%
All other lines  0.057 s0.0%
Totals  922.700 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
padding_and_phiZfunction1962409.333 s44.4%
maxpoolingfunction1962306.131 s33.2%
gpufunction6540.034 s0.0%
Self time (built-ins, overhead, etc.)  207.202 s22.5%
Totals  922.700 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function25
Non-code lines (comments, blank lines)8
Code lines (lines that can run)17
Code lines that did run15
Code lines that did not run2
Coverage (did run/can run)88.24 %
Function listing
time 
Calls 
 line
   1 
function net = feedforward(data, model, net)
   2 

< 0.001 
    654 
   3
num_data = size(data, 2); 
  0.072 
    654 
   4
net.Z{1} = reshape(gpu(data), model.ch_input(1), []); 
   5 

  0.001 
    654 
   6
L = model.L; 
< 0.001 
    654 
   7
LC = model.LC; 
   8 

  0.001 
    654 
   9
for m = 1 : LC 
 457.897 
   1962 
  10
	net.phiZ{m} = padding_and_phiZ(model, net, net.Z{m}, m, num_data); 
 131.892 
   1962 
  11
	net.Z{m+1} = max(model.weight{m}*net.phiZ{m} + model.bias{m}, 0); 
  12 

  0.009 
   1962 
  13
	if model.wd_subimage_pool(m) > 1 
 332.356 
   1962 
  14
		[net.Z{m+1}, net.idx_pool{m}] = maxpooling(model, net, net.Z{m+1}, m); 
< 0.001 
   1962 
  15
	end 
  0.005 
   1962 
  16
end 
  17 

  0.006 
    654 
  18
dab = model.ch_input(LC+1) * model.wd_input(LC+1) * model.ht_input(LC+1); 
  0.022 
    654 
  19
net.Z{LC+1} = reshape(net.Z{LC+1}, dab, []); 
  20 

  0.002 
    654 
  21
for m = LC+1 : L-1 
  22 
	net.Z{m+1} = max(model.weight{m}*net.Z{m} + model.bias{m}, 0);
  23 
end
  24 

  0.426 
    654 
  25
net.Z{L+1} = model.weight{L}*net.Z{L} + model.bias{L}; 

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