コード例 #1
0
ファイル: summary_ops.py プロジェクト: 1000sprites/tensorflow
 def function(tag, scope):
   if bad_color is None:
     bad_color_ = constant_op.constant([255, 0, 0, 255], dtype=dtypes.uint8)
   gen_summary_ops.write_image_summary(
       context.context().summary_writer_resource,
       training_util.get_global_step(), tag, tensor, bad_color_, max_images,
       name=scope)
コード例 #2
0
ファイル: summary_ops.py プロジェクト: jiayouwyhit/tensorflow
 def record():
   if bad_color is None:
     bad_color_ = constant_op.constant([255, 0, 0, 255], dtype=dtypes.uint8)
   with summary_op_util.summary_scope(
       name, family, values=[tensor]) as (tag, scope):
     gen_summary_ops.write_image_summary(
         context.context().summary_writer_resource,
         training_util.get_global_step(), tag, tensor, bad_color_, max_images,
         name=scope)
コード例 #3
0
ファイル: summary_writer.py プロジェクト: SylChan/tensorflow
 def image(self, name, tensor, bad_color=None, max_images=3, family=None):
   """Write an image summary."""
   with context.device(self._CPU_DEVICE):
     if bad_color is None:
       bad_color_ = constant_op.constant([255, 0, 0, 255], dtype=dtypes.uint8)
     with summary_op_util.summary_scope(
         name, family, values=[tensor]) as (tag, scope):
       gen_summary_ops.write_image_summary(
           self._resource, self._update_global_step_tensor(),
           tag, _maybe_cpu(tensor), bad_color_, max_images,
           name=scope)
コード例 #4
0
 def image(self, name, tensor, bad_color=None, max_images=3, family=None):
   """Write an image summary."""
   with context.device(self._CPU_DEVICE):
     if bad_color is None:
       bad_color_ = constant_op.constant([255, 0, 0, 255], dtype=dtypes.uint8)
     with summary_op_util.summary_scope(
         name, family, values=[tensor]) as (tag, scope):
       gen_summary_ops.write_image_summary(
           self._resource, self._update_global_step_tensor(),
           tag, _maybe_as_cpu_tensor(tensor), bad_color_, max_images,
           name=scope)
コード例 #5
0
 def function(tag, scope):
     if bad_color is None:
         bad_color_ = constant_op.constant([255, 0, 0, 255],
                                           dtype=dtypes.uint8)
     gen_summary_ops.write_image_summary(
         context.context().summary_writer_resource,
         training_util.get_global_step(),
         tag,
         tensor,
         bad_color_,
         max_images,
         name=scope)
コード例 #6
0
ファイル: summary_ops.py プロジェクト: zallerting/tensorflow
 def record():
     if bad_color is None:
         bad_color_ = constant_op.constant([255, 0, 0, 255],
                                           dtype=dtypes.uint8)
     with summary_op_util.summary_scope(name, family,
                                        values=[tensor]) as (tag, scope):
         gen_summary_ops.write_image_summary(
             context.context().summary_writer_resource,
             training_util.get_global_step(),
             tag,
             tensor,
             bad_color_,
             max_images,
             name=scope)
コード例 #7
0
ファイル: summary_ops.py プロジェクト: zabzyliu/tensorflow
 def function(tag, scope):
   bad_color_ = (constant_op.constant([255, 0, 0, 255], dtype=dtypes.uint8)
                 if bad_color is None else bad_color)
   # Note the identity to move the tensor to the CPU.
   return gen_summary_ops.write_image_summary(
       context.context().summary_writer_resource,
       global_step, tag, array_ops.identity(tensor),
       bad_color_,
       max_images, name=scope)