ETRI IVCL 1.0.0
Acceleration SW Platform for Ondevice
Functions
parse_log Namespace Reference

Functions

def parse_log (path_to_log)
 
def parse_line_for_net_output (regex_obj, row, row_dict_list, line, iteration, seconds, learning_rate)
 
def fix_initial_nan_learning_rate (dict_list)
 
def save_csv_files (logfile_path, output_dir, train_dict_list, test_dict_list, delimiter=',', verbose=False)
 
def write_csv (output_filename, dict_list, delimiter, verbose=False)
 
def parse_args ()
 
def main ()
 

Detailed Description

Parse training log

Evolved from parse_log.sh

Function Documentation

◆ fix_initial_nan_learning_rate()

def parse_log.fix_initial_nan_learning_rate (   dict_list)
Correct initial value of learning rate

Learning rate is normally not printed until after the initial test and
training step, which means the initial testing and training rows have
LearningRate = NaN. Fix this by copying over the LearningRate from the
second row, if it exists.

◆ main()

def parse_log.main ( )

◆ parse_args()

def parse_log.parse_args ( )

◆ parse_line_for_net_output()

def parse_log.parse_line_for_net_output (   regex_obj,
  row,
  row_dict_list,
  line,
  iteration,
  seconds,
  learning_rate 
)
Parse a single line for training or test output

Returns a a tuple with (row_dict_list, row)
row: may be either a new row or an augmented version of the current row
row_dict_list: may be either the current row_dict_list or an augmented
version of the current row_dict_list

◆ parse_log()

def parse_log.parse_log (   path_to_log)
Parse log file
Returns (train_dict_list, test_dict_list)

train_dict_list and test_dict_list are lists of dicts that define the table
rows

◆ save_csv_files()

def parse_log.save_csv_files (   logfile_path,
  output_dir,
  train_dict_list,
  test_dict_list,
  delimiter = ',',
  verbose = False 
)
Save CSV files to output_dir

If the input log file is, e.g., caffe.INFO, the names will be
caffe.INFO.train and caffe.INFO.test

◆ write_csv()

def parse_log.write_csv (   output_filename,
  dict_list,
  delimiter,
  verbose = False 
)
Write a CSV file