本文整理汇总了Python中tensorflow.contrib.training.checkpoints_iterator方法的典型用法代码示例。如果您正苦于以下问题:Python training.checkpoints_iterator方法的具体用法?Python training.checkpoints_iterator怎么用?Python training.checkpoints_iterator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tensorflow.contrib.training
的用法示例。
在下文中一共展示了training.checkpoints_iterator方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ckpt_iterator
# 需要导入模块: from tensorflow.contrib import training [as 别名]
# 或者: from tensorflow.contrib.training import checkpoints_iterator [as 别名]
def ckpt_iterator(checkpoint_dir, min_interval_secs=0, timeout=None, timeout_fn=None, logger=None):
for ckpt_path in checkpoints_iterator(checkpoint_dir, min_interval_secs, timeout, timeout_fn):
if Path(ckpt_path).suffix == const.CKPT_EXTENSION:
if logger is not None:
logger.info(f"[skip] {ckpt_path}")
else:
yield ckpt_path
示例2: ckpt_iterator
# 需要导入模块: from tensorflow.contrib import training [as 别名]
# 或者: from tensorflow.contrib.training import checkpoints_iterator [as 别名]
def ckpt_iterator(checkpoint_dir, min_interval_secs=0, timeout=None, timeout_fn=None, logger=None):
for ckpt_path in checkpoints_iterator(checkpoint_dir, min_interval_secs, timeout, timeout_fn):
yield ckpt_path