This is a static copy of a profile report

Home

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

Home

JTv (Calls: 354, Time: 641.759 s)
Generated 19-Jun-2021 04:39:11 using performance time.
function in file /nfs/inm_phd/07/d07944009/2021/0618-proj6/simpleNN/MATLAB/cnn/JTv.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
lossgrad_subsetfunction354
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
25
v = vTP(model, net, m, num_dat...
708313.855 s48.9%
17
v = vTP(model, net, m, num_dat...
1062127.794 s19.9%
21
JTv_{m} = [v*net.phiZ{m}' sum(...
1062116.502 s18.2%
24
v = model.weight{m}' * v;
70854.916 s8.6%
30
v = v(:, p+1:p+model.ht_input(...
70818.686 s2.9%
All other lines  10.006 s1.6%
Totals  641.759 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
vTPfunction1770441.587 s68.8%
Self time (built-ins, overhead, etc.)  200.172 s31.2%
Totals  641.759 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function35
Non-code lines (comments, blank lines)10
Code lines (lines that can run)25
Code lines that did run25
Code lines that did not run0
Coverage (did run/can run)100.00 %
Function listing
time 
Calls 
 line
   1 
function JTv_ = JTv(model, net, v)
   2 

  0.001 
    354 
   3
L = model.L; 
< 0.001 
    354 
   4
LC = model.LC; 
< 0.001 
    354 
   5
num_data = size(v, 2); 
  0.006 
    354 
   6
JTv_ = cell(L, 1); 
   7 

< 0.001 
    354 
   8
for m = L : -1 : LC+1 
  0.164 
    354 
   9
	JTv_{m} = [v*net.Z{m}' sum(v, 2)]; 
  0.130 
    354 
  10
	v = model.weight{m}'*v; 
  0.199 
    354 
  11
	v = v.*(net.Z{m} > 0); 
< 0.001 
    354 
  12
end 
  0.007 
    354 
  13
v = reshape(v, model.ch_input(LC+1), []); 
  14 

  0.001 
    354 
  15
for m = LC : -1 : 1 
  0.008 
   1062 
  16
	if model.wd_subimage_pool(m) > 1 
 127.794 
   1062 
  17
		v = vTP(model, net, m, num_data, v, 'pool_gradient'); 
< 0.001 
   1062 
  18
	end 
  0.039 
   1062 
  19
	v = reshape(v, model.ch_input(m+1), []); 
  20 

 116.502 
   1062 
  21
	JTv_{m} = [v*net.phiZ{m}' sum(v, 2)]; 
  22 

  0.002 
   1062 
  23
	if m > 1 
 54.916 
    708 
  24
		v = model.weight{m}' * v; 
 313.855 
    708 
  25
		v = vTP(model, net, m, num_data, v, 'phi_gradient'); 
  26 

  27 
		% vTP_pad
  0.044 
    708 
  28
		v = reshape(v, model.ch_input(m), model.ht_pad(m), model.wd_pad(m), []); 
  0.002 
    708 
  29
		p = model.wd_pad_added(m); 
 18.686 
    708 
  30
		v = v(:, p+1:p+model.ht_input(m), p+1:p+model.wd_input(m), :); 
  31 

  32 
		% activation function
  2.647 
    708 
  33
		v = reshape(v, model.ch_input(m), []) .*(net.Z{m} > 0); 
< 0.001 
   1062 
  34
	end 
  6.747 
   1062 
  35
end 

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