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: 570, Time: 1045.906 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/JTv.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
lossgrad_subsetfunction354
CG>R_JTBJvsubfunction216
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
25
v = vTP(model, net, m, num_dat...
1140508.146 s48.6%
17
v = vTP(model, net, m, num_dat...
1710203.072 s19.4%
21
JTv_{m} = [v*net.phiZ{m}' sum(...
1710199.358 s19.1%
24
v = model.weight{m}' * v;
114096.569 s9.2%
30
v = v(:, p+1:p+model.ht_input(...
114024.435 s2.3%
All other lines  14.326 s1.4%
Totals  1045.906 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
vTPfunction2850711.122 s68.0%
Self time (built-ins, overhead, etc.)  334.784 s32.0%
Totals  1045.906 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.003 
    570 
   3
L = model.L; 
  0.001 
    570 
   4
LC = model.LC; 
< 0.001 
    570 
   5
num_data = size(v, 2); 
  0.011 
    570 
   6
JTv_ = cell(L, 1); 
   7 

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

  0.002 
    570 
  15
for m = LC : -1 : 1 
  0.014 
   1710 
  16
	if model.wd_subimage_pool(m) > 1 
 203.072 
   1710 
  17
		v = vTP(model, net, m, num_data, v, 'pool_gradient'); 
< 0.001 
   1710 
  18
	end 
  0.074 
   1710 
  19
	v = reshape(v, model.ch_input(m+1), []); 
  20 

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

  0.003 
   1710 
  23
	if m > 1 
 96.569 
   1140 
  24
		v = model.weight{m}' * v; 
 508.146 
   1140 
  25
		v = vTP(model, net, m, num_data, v, 'phi_gradient'); 
  26 

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

  32 
		% activation function
  3.845 
   1140 
  33
		v = reshape(v, model.ch_input(m), []) .*(net.Z{m} > 0); 
< 0.001 
   1710 
  34
	end 
  9.531 
   1710 
  35
end 

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