当前位置: 首页>>代码示例>>Python>>正文


Python tensorboard_logger.configure方法代码示例

本文整理汇总了Python中tensorboard_logger.configure方法的典型用法代码示例。如果您正苦于以下问题:Python tensorboard_logger.configure方法的具体用法?Python tensorboard_logger.configure怎么用?Python tensorboard_logger.configure使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在tensorboard_logger的用法示例。


在下文中一共展示了tensorboard_logger.configure方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: import tensorboard_logger [as 别名]
# 或者: from tensorboard_logger import configure [as 别名]
def __init__(self, log_dir):
        if not os.path.isdir(log_dir):
            # if the directory does not exist we create the directory
            os.makedirs(log_dir)
        else:                      
            # clean previous logged data under the same directory name
            self._remove(log_dir)

        # configure the project
        configure(log_dir)

        self.global_step = 0 
开发者ID:priba,项目名称:nmp_qc,代码行数:14,代码来源:LogMetric.py

示例2: run

# 需要导入模块: import tensorboard_logger [as 别名]
# 或者: from tensorboard_logger import configure [as 别名]
def run(harn):
        harn.log('Begin training')

        if False:
            # TODO: can we run this as a subprocess that dies when we die?
            # or do we need to run externally?
            # tensorboard --logdir runs
            # http://aretha:6006
            pass

        if tensorboard_logger:
            harn.log('Initializing tensorboard')
            tensorboard_logger.configure("runs/ibeis", flush_secs=2)

        if harn.use_cuda:
            harn.log('Fitting model on GPU({})'.format(harn.gpu_num))
            harn.model.cuda(harn.gpu_num)
        else:
            harn.log('Fitting model on the CPU')

        if harn.class_weights is not None:
            harn.class_weights, = harn._to_xpu(harn.class_weights)

        lr = harn.lr_scheduler(harn.epoch)
        harn.optimizer = harn.optimizer_cls(harn.model.parameters(), lr=lr)

        # train loop

        while not harn.check_termination():
            harn.train_epoch()

            if harn.vali_loader:
                harn.validation_epoch()

            harn.save_snapshot()

            harn.epoch += 1 
开发者ID:Erotemic,项目名称:ibeis,代码行数:39,代码来源:fit_harness.py

示例3: __init__

# 需要导入模块: import tensorboard_logger [as 别名]
# 或者: from tensorboard_logger import configure [as 别名]
def __init__(self, log_dir):
        # clean previous logged data under the same directory name
        self._remove(log_dir)

        # configure the project
        configure(log_dir)

        self.global_step = 0 
开发者ID:qqueing,项目名称:DeepSpeaker-pytorch,代码行数:10,代码来源:logger.py

示例4: __init__

# 需要导入模块: import tensorboard_logger [as 别名]
# 或者: from tensorboard_logger import configure [as 别名]
def __init__(self, log_dir, remove_previous_files = False):
        # clean previous logged data under the same directory name
        if remove_previous_files:
            self._remove(log_dir)

        # configure the project
        configure(log_dir)

        self.global_step = 0 
开发者ID:gitabcworld,项目名称:skiprnn_pytorch,代码行数:11,代码来源:logger.py

示例5: tensorboard_log

# 需要导入模块: import tensorboard_logger [as 别名]
# 或者: from tensorboard_logger import configure [as 别名]
def tensorboard_log(self, budget, epoch, log, logdir):
        import tensorboard_logger as tl
        worker_path = 'Train/'
        try:
            tl.log_value(worker_path + 'budget', float(budget), int(time.time()))
        except:
            tl.configure(logdir)
            tl.log_value(worker_path + 'budget', float(budget), int(time.time()))
        tl.log_value(worker_path + 'epoch', float(epoch + 1), int(time.time()))
        for name, value in log.items():
            tl.log_value(worker_path + name, float(value), int(time.time())) 
开发者ID:automl,项目名称:Auto-PyTorch,代码行数:13,代码来源:train_node.py


注:本文中的tensorboard_logger.configure方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。