utils/doc_utils.py
def write_to_file_doc(train_acc, train_loss, test_acc, test_loss, epoch, config):
    """
    creates if not exist and update sumary csv file of the the training
    """
    columns = ['experiment_name', 'epoch', 'train_loss', 'train_accuracy', 'test_loss', "test_accuracy", 'timestamp']
    directory = config.summary_dir
    if os.path.exists(directory + '/exp_summary.csv'):
        f = pd.read_csv(directory + '/exp_summary.csv')
    else:
        f = pd.DataFrame(columns=columns)
    val = [config.exp_name, epoch, train_loss, train_acc, test_loss, test_acc, config.timestamp]
    f = f.append(pd.DataFrame([val], columns=columns))
    f.to_csv(directory + '/exp_summary.csv')

    creates if not exist and update sumary csv file of the the training
    
creates if not exist and update sumary csv file of the the training
creates if not exist and update sumary csv file of the the training
def write_to_file_doc(train_acc, train_loss, test_acc, test_loss, epoch, config):
    columns = ['experiment_name', 'epoch', 'train_loss', 'train_accuracy', 'test_loss', "test_accuracy", 'timestamp']
    directory = config.summary_dir
    if os.path.exists(directory + '/exp_summary.csv'):
        f = pd.read_csv(directory + '/exp_summary.csv')
    else:
        f = pd.DataFrame(columns=columns)
    val = [config.exp_name, epoch, train_loss, train_acc, test_loss, test_acc, config.timestamp]
    f = f.append(pd.DataFrame([val], columns=columns))
    f.to_csv(directory + '/exp_summary.csv')
def write_to_file_doc ( train_acc , train_loss , test_acc , test_loss , epoch , config ) : columns = [ 'experiment_name' , 'epoch' , 'train_loss' , 'train_accuracy' , 'test_loss' , "test_accuracy" , 'timestamp' ] directory = config . summary_dir if os . path . exists ( directory + '/exp_summary.csv' ) : f = pd . read_csv ( directory + '/exp_summary.csv' ) else : f = pd . DataFrame ( columns = columns ) val = [ config . exp_name , epoch , train_loss , train_acc , test_loss , test_acc , config . timestamp ] f = f . append ( pd . DataFrame ( [ val ] , columns = columns ) ) f . to_csv ( directory + '/exp_summary.csv' )
creates if not exist and update sumary csv file of the the training
creates if not exist and update sumary csv file of the the training
"""
    creates if not exist and update sumary csv file of the the training
    """
train_acc
train_loss
test_acc
test_loss
epoch
config