コード例 #1
0
def cp_best_weights_to_reports_path(checkpoint_path, report_path, timestamp):
    best_weights_file = get_best_weights_file_from(checkpoint_path)
    loss = get_loss_model_weights_path(best_weights_file)
    result_path = create_file_path(report_path,
                                   f'{timestamp}-weights-loss_{loss}', 'h5')
    copyfile(best_weights_file, result_path)
    return result_path
コード例 #2
0
 def __init__(self, config):
     self.__config = config
     self.__file_path = create_file_path(config['path'], config["name"],
                                         'log')
     self.__level = self.__to_logging_level(config['level'])
     self.__fmt = config['message_format']
     self.__date_fmt = config['date_format']
コード例 #3
0
 def __init__(self,
              metric_path,
              metric_name,
              display_name='',
              description=''):
     self.__metric_name = metric_name
     self.__writer = tf.summary.FileWriter(
         create_file_path(metric_path, metric_name))
     self.__metadata = SummaryBuilder.metadata(display_name, description)
コード例 #4
0
def write_report(report_path, report, timestamp, ext):
    report_file_path = create_file_path(report_path, f'{timestamp}_report',
                                        ext)
    file = open(report_file_path, 'w')
    file.write(report)
    file.close()
コード例 #5
0
 def get_path(self, ctx):
     return create_file_path(self.__metric_path,
                             f'weights-time_{ctx.time}-loss_0', 'h5')