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: 649, Time: 881.294 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/feedforward.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
lossgrad_subsetfunction649
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
10
net.phiZ{m} = padding_and_phiZ...
1947445.521 s50.6%
14
[net.Z{m+1}, net.idx_pool{m}] ...
1947300.646 s34.1%
11
net.Z{m+1} = max(model.weight{...
1947134.545 s15.3%
25
net.Z{L+1} = model.weight{L}*n...
6490.449 s0.1%
4
net.Z{1} = reshape(gpu(data), ...
6490.074 s0.0%
All other lines  0.058 s0.0%
Totals  881.294 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
padding_and_phiZfunction1947400.620 s45.5%
maxpoolingfunction1947276.602 s31.4%
gpufunction6490.033 s0.0%
Self time (built-ins, overhead, etc.)  204.038 s23.2%
Totals  881.294 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 
    649 
   3
num_data = size(data, 2); 
  0.074 
    649 
   4
net.Z{1} = reshape(gpu(data), model.ch_input(1), []); 
   5 

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

  0.001 
    649 
   9
for m = 1 : LC 
 445.521 
   1947 
  10
	net.phiZ{m} = padding_and_phiZ(model, net, net.Z{m}, m, num_data); 
 134.545 
   1947 
  11
	net.Z{m+1} = max(model.weight{m}*net.phiZ{m} + model.bias{m}, 0); 
  12 

  0.011 
   1947 
  13
	if model.wd_subimage_pool(m) > 1 
 300.646 
   1947 
  14
		[net.Z{m+1}, net.idx_pool{m}] = maxpooling(model, net, net.Z{m+1}, m); 
< 0.001 
   1947 
  15
	end 
  0.004 
   1947 
  16
end 
  17 

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

  0.002 
    649 
  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.449 
    649 
  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.