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


Python event_file_writer.EventFileWriter方法代码示例

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


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

示例1: __init__

# 需要导入模块: from tensorflow.python.summary.writer import event_file_writer [as 别名]
# 或者: from tensorflow.python.summary.writer.event_file_writer import EventFileWriter [as 别名]
def __init__(self, log_dir, enable=True):
    """Create a new SummaryWriter.

    Args:
      log_dir: path to record tfevents files in.
      enable: bool: if False don't actually write or flush data.  Used in
        multihost training.
    """
    # If needed, create log_dir directory as well as missing parent directories.
    if not tf.io.gfile.isdir(log_dir):
      tf.io.gfile.makedirs(log_dir)

    self._event_writer = EventFileWriter(log_dir, 10, 120, None)
    self._step = 0
    self._closed = False
    self._enabled = enable 
开发者ID:google,项目名称:trax,代码行数:18,代码来源:jaxboard.py

示例2: reopen

# 需要导入模块: from tensorflow.python.summary.writer import event_file_writer [as 别名]
# 或者: from tensorflow.python.summary.writer.event_file_writer import EventFileWriter [as 别名]
def reopen(self):
    """Reopens the EventFileWriter.

    Can be called after `close()` to add more events in the same directory.
    The events will go into a new events file.

    Does nothing if the EventFileWriter was not closed.
    """
    self.event_writer.reopen() 
开发者ID:ryfeus,项目名称:lambda-packs,代码行数:11,代码来源:writer.py

示例3: __init__

# 需要导入模块: from tensorflow.python.summary.writer import event_file_writer [as 别名]
# 或者: from tensorflow.python.summary.writer.event_file_writer import EventFileWriter [as 别名]
def __init__(self, log_dir):
    """Create a new SummaryWriter.

    Args:
      log_dir: path to record tfevents files in.
    """
    # If needed, create log_dir directory as well as missing parent directories.
    if not gfile.isdir(log_dir):
      gfile.makedirs(log_dir)

    self._event_writer = EventFileWriter(log_dir, 10, 120, None)
    self._step = 0
    self._closed = False 
开发者ID:yyht,项目名称:BERT,代码行数:15,代码来源:jaxboard.py

示例4: __init__

# 需要导入模块: from tensorflow.python.summary.writer import event_file_writer [as 别名]
# 或者: from tensorflow.python.summary.writer.event_file_writer import EventFileWriter [as 别名]
def __init__(self,
               logdir,
               graph=None,
               max_queue=10,
               flush_secs=120,
               graph_def=None,
               filename_suffix=None):
    """Creates a `FileWriter` and an event file.

    On construction the summary writer creates a new event file in `logdir`.
    This event file will contain `Event` protocol buffers constructed when you
    call one of the following functions: `add_summary()`, `add_session_log()`,
    `add_event()`, or `add_graph()`.

    If you pass a `Graph` to the constructor it is added to
    the event file. (This is equivalent to calling `add_graph()` later).

    TensorBoard will pick the graph from the file and display it graphically so
    you can interactively explore the graph you built. You will usually pass
    the graph from the session in which you launched it:

    ```python
    ...create a graph...
    # Launch the graph in a session.
    sess = tf.Session()
    # Create a summary writer, add the 'graph' to the event file.
    writer = tf.summary.FileWriter(<some-directory>, sess.graph)
    ```

    The other arguments to the constructor control the asynchronous writes to
    the event file:

    *  `flush_secs`: How often, in seconds, to flush the added summaries
       and events to disk.
    *  `max_queue`: Maximum number of summaries or events pending to be
       written to disk before one of the 'add' calls block.

    Args:
      logdir: A string. Directory where event file will be written.
      graph: A `Graph` object, such as `sess.graph`.
      max_queue: Integer. Size of the queue for pending events and summaries.
      flush_secs: Number. How often, in seconds, to flush the
        pending events and summaries to disk.
      graph_def: DEPRECATED: Use the `graph` argument instead.
      filename_suffix: A string. Every event file's name is suffixed with
        `suffix`.
    """
    event_writer = EventFileWriter(logdir, max_queue, flush_secs,
                                   filename_suffix)
    super(FileWriter, self).__init__(event_writer, graph, graph_def) 
开发者ID:ryfeus,项目名称:lambda-packs,代码行数:52,代码来源:writer.py

示例5: __init__

# 需要导入模块: from tensorflow.python.summary.writer import event_file_writer [as 别名]
# 或者: from tensorflow.python.summary.writer.event_file_writer import EventFileWriter [as 别名]
def __init__(self,
               logdir,
               graph=None,
               max_queue=10,
               flush_secs=120,
               graph_def=None):
    """Creates a `FileWriter` and an event file.

    On construction the summary writer creates a new event file in `logdir`.
    This event file will contain `Event` protocol buffers constructed when you
    call one of the following functions: `add_summary()`, `add_session_log()`,
    `add_event()`, or `add_graph()`.

    If you pass a `Graph` to the constructor it is added to
    the event file. (This is equivalent to calling `add_graph()` later).

    TensorBoard will pick the graph from the file and display it graphically so
    you can interactively explore the graph you built. You will usually pass
    the graph from the session in which you launched it:

    ```python
    ...create a graph...
    # Launch the graph in a session.
    sess = tf.Session()
    # Create a summary writer, add the 'graph' to the event file.
    writer = tf.summary.FileWriter(<some-directory>, sess.graph)
    ```

    The other arguments to the constructor control the asynchronous writes to
    the event file:

    *  `flush_secs`: How often, in seconds, to flush the added summaries
       and events to disk.
    *  `max_queue`: Maximum number of summaries or events pending to be
       written to disk before one of the 'add' calls block.

    Args:
      logdir: A string. Directory where event file will be written.
      graph: A `Graph` object, such as `sess.graph`.
      max_queue: Integer. Size of the queue for pending events and summaries.
      flush_secs: Number. How often, in seconds, to flush the
        pending events and summaries to disk.
      graph_def: DEPRECATED: Use the `graph` argument instead.
    """
    event_writer = EventFileWriter(logdir, max_queue, flush_secs)
    super(FileWriter, self).__init__(event_writer, graph, graph_def) 
开发者ID:abhisuri97,项目名称:auto-alt-text-lambda-api,代码行数:48,代码来源:writer.py

示例6: __init__

# 需要导入模块: from tensorflow.python.summary.writer import event_file_writer [as 别名]
# 或者: from tensorflow.python.summary.writer.event_file_writer import EventFileWriter [as 别名]
def __init__(self,
               logdir,
               graph=None,
               max_queue=10,
               flush_secs=120,
               graph_def=None):
    """Creates a `FileWriter` and an event file.

    On construction the summary writer creates a new event file in `logdir`.
    This event file will contain `Event` protocol buffers constructed when you
    call one of the following functions: `add_summary()`, `add_session_log()`,
    `add_event()`, or `add_graph()`.

    If you pass a `Graph` to the constructor it is added to
    the event file. (This is equivalent to calling `add_graph()` later).

    TensorBoard will pick the graph from the file and display it graphically so
    you can interactively explore the graph you built. You will usually pass
    the graph from the session in which you launched it:

    ```python
    ...create a graph...
    # Launch the graph in a session.
    sess = tf.Session()
    # Create a summary writer, add the 'graph' to the event file.
    writer = tf.train.SummaryWriter(<some-directory>, sess.graph)
    ```

    The other arguments to the constructor control the asynchronous writes to
    the event file:

    *  `flush_secs`: How often, in seconds, to flush the added summaries
       and events to disk.
    *  `max_queue`: Maximum number of summaries or events pending to be
       written to disk before one of the 'add' calls block.

    Args:
      logdir: A string. Directory where event file will be written.
      graph: A `Graph` object, such as `sess.graph`.
      max_queue: Integer. Size of the queue for pending events and summaries.
      flush_secs: Number. How often, in seconds, to flush the
        pending events and summaries to disk.
      graph_def: DEPRECATED: Use the `graph` argument instead.
    """
    event_writer = EventFileWriter(logdir, max_queue, flush_secs)
    super(FileWriter, self).__init__(event_writer, graph, graph_def) 
开发者ID:tobegit3hub,项目名称:deep_image_model,代码行数:48,代码来源:writer.py


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