This is a static copy of a profile report

Home

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

Home

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

Parents (calling functions)

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

Line NumberCodeCallsTotal Time% TimeTime Plot
16
net.phiZ{m} = padding_and_phiZ...
648142.605 s25.1%
23
[net.Z{m+1}, net.idx_pool{m}, ...
648141.716 s24.9%
19
R_Z = padding_and_phiZ(model, ...
648132.362 s23.3%
20
R_Z = model.weight{m}*R_Z + v_...
648102.944 s18.1%
17
net.Z{m+1} = max(model.weight{...
64846.569 s8.2%
All other lines  2.278 s0.4%
Totals  568.474 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
padding_and_phiZfunction1296264.881 s46.6%
maxpoolingfunction648133.879 s23.6%
gpufunction4320.270 s0.0%
Self time (built-ins, overhead, etc.)  169.444 s29.8%
Totals  568.474 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function43
Non-code lines (comments, blank lines)10
Code lines (lines that can run)33
Code lines that did run31
Code lines that did not run2
Coverage (did run/can run)93.94 %
Function listing
time 
Calls 
 line
   1 
function [R_Z, net] = Jv(data, model, net, v)
   2 

  0.002 
    216 
   3
L = model.L; 
< 0.001 
    216 
   4
LC = model.LC; 
< 0.001 
    216 
   5
var_ptr = model.var_ptr; 
< 0.001 
    216 
   6
num_data = size(data, 2); 
   7 

  0.032 
    216 
   8
net.Z{1} = reshape(gpu(data), model.ch_input(1), []); 
  0.269 
    216 
   9
R_Z = gpu(@zeros, size(net.Z{1})); 
  10 

  0.001 
    216 
  11
for m = 1 : LC 
  0.048 
    648 
  12
	var_range = var_ptr(m) : var_ptr(m+1) - 1; 
  0.005 
    648 
  13
	d = model.ch_input(m+1); 
  0.135 
    648 
  14
	v_ = reshape(v(var_range), d, []); 
  15 

 142.605 
    648 
  16
	net.phiZ{m} = padding_and_phiZ(model, net, net.Z{m}, m, num_data); 
 46.569 
    648 
  17
	net.Z{m+1} = max(model.weight{m}*net.phiZ{m} + model.bias{m}, 0); 
  18 

 132.362 
    648 
  19
	R_Z = padding_and_phiZ(model, net, R_Z, m, num_data); 
 102.944 
    648 
  20
	R_Z = model.weight{m}*R_Z + v_(:, 1:end-1)*net.phiZ{m} + v_(:, end); 
  21 

  0.010 
    648 
  22
	if model.wd_subimage_pool(m) > 1 
 141.716 
    648 
  23
		[net.Z{m+1}, net.idx_pool{m}, R_Z] = maxpooling(model, net, net.Z{m+1}, m, R_Z); 
< 0.001 
    648 
  24
	end 
  25 

  0.002 
    648 
  26
	if m == LC 
  0.009 
    216 
  27
		net.Z{m+1} = reshape(net.Z{m+1}, [], num_data); 
  0.002 
    216 
  28
		R_Z = reshape(R_Z, [], num_data); 
< 0.001 
    648 
  29
	end 
  1.516 
    648 
  30
	R_Z = (net.Z{m+1} > 0).*R_Z; 
  0.005 
    648 
  31
end 
  32 

  0.002 
    216 
  33
for m = LC+1 : L 
  0.009 
    216 
  34
	var_range = var_ptr(m) : var_ptr(m+1) - 1; 
  0.002 
    216 
  35
	n_m = model.full_neurons(m-LC); 
  0.018 
    216 
  36
	v_ = reshape(v(var_range), n_m, []); 
  37 

  0.205 
    216 
  38
	R_Z = model.weight{m}*R_Z + v_(:, 1:end-1)*net.Z{m} + v_(:, end); 
< 0.001 
    216 
  39
	if m < L 
  40 
		net.Z{m+1} = max(model.weight{m}*net.Z{m} + model.bias{m}, 0);
  41 
		R_Z = (net.Z{m+1} > 0).*R_Z;
< 0.001 
    216 
  42
	end 
  0.003 
    216 
  43
end 

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