This is a static copy of a profile report

Home

Function details for Jacobian>cal_dzdSThis is a static copy of a profile report

Home

Jacobian>cal_dzdS (Calls: 5, Time: 199.856 s)
Generated 19-Jun-2021 04:39:10 using performance time.
subfunction in file /nfs/inm_phd/07/d07944009/2021/0618-proj6/simpleNN/MATLAB/cnn/Jacobian.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
Jacobianfunction5
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
31
net.dzdS{m-1} = vTP(model, net...
10112.861 s56.5%
24
net.dzdS{m} = vTP(model, net, ...
1552.218 s26.1%
30
v = model.weight{m}' * net.dzd...
1019.557 s9.8%
36
net.dzdS{m-1} = net.dzdS{m-1}(...
109.139 s4.6%
40
end
154.025 s2.0%
All other lines  2.056 s1.0%
Totals  199.856 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
vTPfunction25164.039 s82.1%
gpufunction50.001 s0.0%
Self time (built-ins, overhead, etc.)  35.817 s17.9%
Totals  199.856 s100% 
Code Analyzer results
Line numberMessage
Coverage results
Show coverage for parent directory
Total lines in function32
Non-code lines (comments, blank lines)10
Code lines (lines that can run)22
Code lines that did run22
Code lines that did not run0
Coverage (did run/can run)100.00 %
Function listing
time 
Calls 
 line
   9 
function net = cal_dzdS(model, net, num_data)
  10 

< 0.001 
      5 
  11
L = model.L; 
< 0.001 
      5 
  12
LC = model.LC; 
< 0.001 
      5 
  13
nL = model.nL;  
< 0.001 
      5 
  14
net.dzdS = cell(L, 1); 
  15 

  0.006 
      5 
  16
net.dzdS{L} = repmat(gpu(@eye, [nL, nL]), 1, num_data); 
  17 

< 0.001 
      5 
  18
for m = L : -1 : max(LC+1, 2) 
  0.123 
      5 
  19
	net.dzdS{m-1} = (model.weight{m}' * net.dzdS{m}).*reshape(repmat(net.Z{m} > 0, nL, 1), [], nL*num_data); 
< 0.001 
      5 
  20
end 
  21 

< 0.001 
      5 
  22
for m = LC : -1 : 1 
  0.001 
     15 
  23
	if model.wd_subimage_pool(m) > 1  
 52.218 
     15 
  24
		net.dzdS{m} = vTP(model, net, m, num_data, net.dzdS{m}, 'pool_Jacobian'); 
< 0.001 
     15 
  25
	end 
  26 

  0.002 
     15 
  27
	net.dzdS{m} = reshape(net.dzdS{m}, model.ch_input(m+1), []); 
  28 

< 0.001 
     15 
  29
	if m > 1 
 19.557 
     10 
  30
		v = model.weight{m}' * net.dzdS{m}; 
 112.861 
     10 
  31
		net.dzdS{m-1} = vTP(model, net, m, num_data, v, 'phi_Jacobian'); 
  32 

  33 
		% vTP_pad 
  0.003 
     10 
  34
		net.dzdS{m-1} = reshape(net.dzdS{m-1}, model.ch_input(m), model.ht_pad(m), model.wd_pad(m), []); 
< 0.001 
     10 
  35
		p = model.wd_pad_added(m); 
  9.139 
     10 
  36
		net.dzdS{m-1} = net.dzdS{m-1}(:, p+1:p+model.ht_input(m), p+1:p+model.wd_input(m), :); 
  37 

  1.916 
     10 
  38
		net.dzdS{m-1} = reshape(net.dzdS{m-1}, [], nL, num_data) .* reshape(net.Z{m} > 0, [], 1, num_data); 
< 0.001 
     15 
  39
	end 
  4.025 
     15 
  40
end 

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