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)
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)
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)
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)
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)
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)
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)