"git@developer.sourcefind.cn:OpenDAS/torch-harmonics.git" did not exist on "1ea5c4ca08400bbc456001c847ea267e9ad2baac"
Commit 37c6feb0 authored by A. Unique TensorFlower's avatar A. Unique TensorFlower
Browse files

Cast bounding box summaries to float32 for visualization.

If bfloat16 casting policy is used, model layers inputs may be automatically
casted to bfloat16.

PiperOrigin-RevId: 297232246
parent 7c0e458b
...@@ -104,8 +104,8 @@ def visualize_images_with_bounding_boxes(images, box_outputs, step, ...@@ -104,8 +104,8 @@ def visualize_images_with_bounding_boxes(images, box_outputs, step,
[image_height, image_width]) [image_height, image_width])
bounding_box_color = tf.constant([[1.0, 1.0, 0.0, 1.0]]) bounding_box_color = tf.constant([[1.0, 1.0, 0.0, 1.0]])
image_summary = tf.image.draw_bounding_boxes(images, normalized_boxes, image_summary = tf.image.draw_bounding_boxes(
bounding_box_color) tf.cast(images, tf.float32), normalized_boxes, bounding_box_color)
with summary_writer.as_default(): with summary_writer.as_default():
tf.summary.image('bounding_box_summary', image_summary, step=step) tf.summary.image('bounding_box_summary', image_summary, step=step)
summary_writer.flush() summary_writer.flush()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment