This is a static copy of a profile report

Home

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

Home

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

Parents (calling functions)

Function NameFunction TypeCalls
examplefunction1
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
34
model = train(prob, prob_v, pa...
12204.893 s99.9%
27
prob = check_data(y, Z, net_co...
10.952 s0.0%
18
rng(seed);
10.189 s0.0%
23
addpath(genpath('./cnn'), genp...
10.084 s0.0%
25
param = parameter(Z, options);
10.041 s0.0%
All other lines  0.007 s0.0%
Totals  2206.167 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
trainfunction12204.827 s99.9%
check_datafunction10.947 s0.0%
rngfunction10.173 s0.0%
addpathfunction10.077 s0.0%
cnn_train>parametersubfunction10.040 s0.0%
genpathfunction20.007 s0.0%
read_configfunction10.007 s0.0%
Self time (built-ins, overhead, etc.)  0.089 s0.0%
Totals  2206.167 s100% 
Code Analyzer results
Line numberMessage
8RAND or RANDN with the 'seed', 'state', or 'twister' inputs is not recommended. Use RNG instead.
9RAND or RANDN with the 'seed', 'state', or 'twister' inputs is not recommended. Use RNG instead.
15RAND or RANDN with the 'seed', 'state', or 'twister' inputs is not recommended. Use RNG instead.
16RAND or RANDN with the 'seed', 'state', or 'twister' inputs is not recommended. Use RNG instead.
Coverage results
Show coverage for parent directory
Total lines in function34
Non-code lines (comments, blank lines)5
Code lines (lines that can run)29
Code lines that did run15
Code lines that did not run14
Coverage (did run/can run)51.72 %
Function listing
time 
Calls 
 line
   1 
function model = cnn_train(y, Z, y_v, Z_v, config_file, options, seed)
   2 

< 0.001 
      1 
   3
if nargin == 5 || nargin == 6 
   4 
	if nargin == 5
   5 
		options = '';
   6 
	end
   7 
	if exist('OCTAVE_VERSION', 'builtin')
   8 
		rand('state');
   9 
		randn('state');
  10 
	else
  11 
		rng('shuffle');
  12 
	end
< 0.001 
      1 
  13
elseif nargin == 7 
< 0.001 
      1 
  14
	if exist('OCTAVE_VERSION', 'builtin') 
  15 
		rand('state', seed);
  16 
		randn('state', seed);
< 0.001 
      1 
  17
	else 
  0.189 
      1 
  18
		rng(seed); 
< 0.001 
      1 
  19
	end 
  20 
else
  21 
	error('The #arguments is incorrect.');
< 0.001 
      1 
  22
end 
  0.084 
      1 
  23
addpath(genpath('./cnn'), genpath('./opt')); 
  24 

  0.041 
      1 
  25
param = parameter(Z, options); 
  0.007 
      1 
  26
net_config = read_config(config_file); 
  0.952 
      1 
  27
prob = check_data(y, Z, net_config); 
  28 
% check if the vaildation data exists
< 0.001 
      1 
  29
prob_v = struct; 
< 0.001 
      1 
  30
if ~isempty(y_v) && ~isempty(Z_v) 
  31 
	prob_v = check_data(y_v, Z_v, net_config);
< 0.001 
      1 
  32
end 
  33 

 2204.893 
      1 
  34
model = train(prob, prob_v, param, net_config); 

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