Ejemplo n.º 1
0
 def function(tag, scope):
     gen_summary_ops.write_scalar_summary(
         context.context().summary_writer_resource,
         training_util.get_global_step(),
         tag,
         tensor,
         name=scope)
Ejemplo n.º 2
0
 def record():
     with summary_op_util.summary_scope(name, family,
                                        values=[tensor]) as (tag, scope):
         gen_summary_ops.write_scalar_summary(
             context.context().summary_writer_resource,
             training_util.get_global_step(),
             tag,
             tensor,
             name=scope)
Ejemplo n.º 3
0
 def function(tag, scope):
     # Note the identity to move the tensor to the CPU.
     return gen_summary_ops.write_scalar_summary(
         context.context().summary_writer_resource,
         _choose_step(step),
         tag,
         array_ops.identity(tensor),
         name=scope)
Ejemplo n.º 4
0
 def function(tag, scope):
   # Note the identity to move the tensor to the CPU.
   return gen_summary_ops.write_scalar_summary(
       context.context().summary_writer_resource,
       _choose_step(step),
       tag,
       array_ops.identity(tensor),
       name=scope)
Ejemplo n.º 5
0
 def function(tag, scope):
     # Note the identity to move the tensor to the CPU.
     return gen_summary_ops.write_scalar_summary(
         context.context().summary_writer_resource,
         training_util.get_global_step(),
         tag,
         array_ops.identity(tensor),
         name=scope)
Ejemplo n.º 6
0
  def scalar(self, name, tensor, family=None):
    """Write a scalar summary.

    Args:
      name: A name for the generated node. Will also serve as the series name in
        TensorBoard.
      tensor: A real numeric `Tensor` or compatible value type containing a
        single value.
      family: Optional; if provided, used as the prefix of the summary tag name,
        which controls the tab name used for display on Tensorboard.

    Returns:
      A summary writer function for scalars.
    """
    with context.device(self._CPU_DEVICE):
      with summary_op_util.summary_scope(
          name, family, values=[tensor]) as (tag, scope):
        gen_summary_ops.write_scalar_summary(
            self._resource, self._update_global_step_tensor(),
            tag, _maybe_cpu(tensor), name=scope)
Ejemplo n.º 7
0
  def scalar(self, name, tensor, family=None):
    """Write a scalar summary.

    Args:
      name: A name for the generated node. Will also serve as the series name in
        TensorBoard.
      tensor: A real numeric `Tensor` or compatible value type containing a
        single value.
      family: Optional; if provided, used as the prefix of the summary tag name,
        which controls the tab name used for display on Tensorboard.

    Returns:
      A summary writer function for scalars.
    """
    with context.device(self._CPU_DEVICE):
      with summary_op_util.summary_scope(
          name, family, values=[tensor]) as (tag, scope):
        gen_summary_ops.write_scalar_summary(
            self._resource, self._update_global_step_tensor(),
            tag, _maybe_as_cpu_tensor(tensor), name=scope)
Ejemplo n.º 8
0
 def function(tag, scope):
   # Note the identity to move the tensor to the CPU.
   return gen_summary_ops.write_scalar_summary(
       context.context().summary_writer_resource,
       training_util.get_global_step(), tag, array_ops.identity(tensor),
       name=scope)
Ejemplo n.º 9
0
 def function(tag, scope):
   gen_summary_ops.write_scalar_summary(
       context.context().summary_writer_resource,
       training_util.get_global_step(), tag, tensor, name=scope)
Ejemplo n.º 10
0
 def record():
   with summary_op_util.summary_scope(
       name, family, values=[tensor]) as (tag, scope):
     gen_summary_ops.write_scalar_summary(
         context.context().summary_writer_resource,
         training_util.get_global_step(), tag, tensor, name=scope)