This is a static copy of a profile report

Home

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

Home

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

Parents (calling functions)

Function NameFunction TypeCalls
cnn_trainfunction1
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
10
s = fgetl(fid);
140.004 s52.8%
13
eval(['net_config.' s]);
110.001 s16.8%
12
if strcmp(s(1),'%') == 0
130.000 s6.3%
16
end
140.000 s5.7%
9
while ~feof(fid)
10.000 s5.0%
All other lines  0.001 s13.3%
Totals  0.007 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
fgetlfunction140.002 s34.7%
Self time (built-ins, overhead, etc.)  0.004 s65.3%
Totals  0.007 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function19
Non-code lines (comments, blank lines)4
Code lines (lines that can run)15
Code lines that did run14
Code lines that did not run1
Coverage (did run/can run)93.33 %
Function listing
time 
Calls 
 line
   1 
function net_config = read_config(config_file)
   2 

< 0.001 
      1 
   3
net_config = struct; 
   4 

< 0.001 
      1 
   5
fid = fopen(config_file, 'r'); 
< 0.001 
      1 
   6
if fid == -1 
   7 
	error('The configure file cannot be opened.');
< 0.001 
      1 
   8
end 
< 0.001 
      1 
   9
while ~feof(fid) 
  0.004 
     14 
  10
	s = fgetl(fid); 
< 0.001 
     14 
  11
	if ~isempty(s) 
< 0.001 
     13 
  12
		if strcmp(s(1),'%') == 0 
  0.001 
     11 
  13
			eval(['net_config.' s]); 
     13 
  14
		end 
< 0.001 
     14 
  15
	end 
< 0.001 
     14 
  16
end 
< 0.001 
      1 
  17
fclose(fid); 
  18 

< 0.001 
      1 
  19
net_config.nL = net_config.full_neurons(net_config.LF); 

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