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: 2506.560 s)
Generated 19-Jun-2021 04:01:54 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...
12505.164 s99.9%
27
prob = check_data(y, Z, net_co...
11.016 s0.0%
18
rng(seed);
10.228 s0.0%
23
addpath(genpath('./cnn'), genp...
10.096 s0.0%
25
param = parameter(Z, options);
10.047 s0.0%
All other lines  0.009 s0.0%
Totals  2506.560 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
trainfunction12505.116 s99.9%
check_datafunction11.008 s0.0%
rngfunction10.208 s0.0%
addpathfunction10.087 s0.0%
cnn_train>parametersubfunction10.047 s0.0%
read_configfunction10.008 s0.0%
genpathfunction20.008 s0.0%
Self time (built-ins, overhead, etc.)  0.076 s0.0%
Totals  2506.560 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.228 
      1 
  18
		rng(seed); 
< 0.001 
      1 
  19
	end 
  20 
else
  21 
	error('The #arguments is incorrect.');
< 0.001 
      1 
  22
end 
  0.096 
      1 
  23
addpath(genpath('./cnn'), genpath('./opt')); 
  24 

  0.047 
      1 
  25
param = parameter(Z, options); 
  0.009 
      1 
  26
net_config = read_config(config_file); 
  1.016 
      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 

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

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