debugger_plugin.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:tensorboard 作者: tensorflow 项目源码 文件源码
def _process_health_pill_value(self,
                                 wall_time,
                                 step,
                                 device_name,
                                 output_slot,
                                 node_name,
                                 tensor_proto,
                                 node_name_set=None):
    """Creates a HealthPillEvent containing various properties of a health pill.

    Args:
      wall_time: The wall time in seconds.
      step: The session run step of the event.
      device_name: The name of the node's device.
      output_slot: The numeric output slot.
      node_name: The name of the node (without the output slot).
      tensor_proto: A tensor proto of data.
      node_name_set: An optional set of node names that are relevant. If not
        provided, no filtering by relevance occurs.

    Returns:
      An event_accumulator.HealthPillEvent. Or None if one could not be created.
    """
    if node_name_set and node_name not in node_name_set:
      # This event is not relevant.
      return None

    # Since we seek health pills for a specific step, this function
    # returns 1 health pill per node per step. The wall time is the
    # seconds since the epoch.
    elements = list(tf.make_ndarray(tensor_proto))
    return HealthPillEvent(
        wall_time=wall_time,
        step=step,
        device_name=device_name,
        output_slot=output_slot,
        node_name=node_name,
        dtype=repr(tf.as_dtype(elements[12])),
        shape=elements[14:],
        value=elements)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号