Пример #1
0
def get_ckpt_path(args, epoch, loss):
    ckpt_name = get_dirname_from_args(args)
    ckpt_path = args.ckpt_path / ckpt_name
    args.ckpt_path.mkdir(exist_ok=True)
    ckpt_path.mkdir(exist_ok=True)
    loss = '{:.4f}'.format(loss)
    ckpt_path = ckpt_path / 'loss_{}_epoch_{}.pickle'.format(loss, epoch)

    return ckpt_path
Пример #2
0
    def __init__(self, args):
        self.log_cmd = args.log_cmd
        log_name = get_dirname_from_args(args)
        log_name += f'_{get_now()}'
        self.log_path = args.log_path / log_name
        os.makedirs(self.log_path, exist_ok=True)
        self.tfboard = SummaryWriter(self.log_path)

        self.url = run_tensorboard(self.log_path)
        print(f"Running Tensorboard at {self.url}")
Пример #3
0
    def __init__(self, args):
        self.log_cmd = args.log_cmd
        log_name = get_dirname_from_args(args)
        log_name += '_{}'.format(get_now())
        self.log_path = args.log_path / log_name
        # os.makedirs(self.log_path, exist_ok=True)
        self.log_path.mkdir(parents=True, exist_ok=True)
        self.tfboard = SummaryWriter(self.log_path)

        self.url = run_tensorboard(self.log_path)
        print("Running Tensorboard at {}".format(self.url))
Пример #4
0
    def __init__(self, args):
        # also show log in commandline?
        self.log_cmd = args.log_cmd

        log_name = get_dirname_from_args(args)
        log_name += '_{}'.format(get_now())

        self.log_path = args.log_path / log_name
        self.log_path.mkdir(parents=True, exist_ok=True)

        # also show tensorboard
        self.tfboard = SummaryWriter(self.log_path)
        self.url = run_tensorboard(self.log_path)
        print("Running Tensorboard at {}".format(self.url))
Пример #5
0
def get_ckpt_path(args, epoch, loss):
    ckpt_name = get_dirname_from_args(args)
    # inside the ckpt path
    ckpt_path = args.ckpt_path / ckpt_name
    # if you are creating checkpoint file for the first time
    args.ckpt_path.mkdir(exist_ok=True)
    ckpt_path.mkdir(exist_ok=True)

    # checkpoint name is named after the loss and epoch
    loss = '{:.4f}'.format(loss)
    ckpt_path = ckpt_path / 'loss_{}_epoch_{}.pickle'.format(loss, epoch)

    # return the path name/address
    return ckpt_path