Skip to content

Commit

Permalink
compute ms ssim in test steps
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidtronix committed Jan 21, 2025
1 parent e12001a commit 3c30897
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ml4h/models/diffusion_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ def test_step(self, batch):
self.kid.update_state(images, generated_images)
max_pixel_value = tf.reduce_max(tf.abs(generated_images))
max_val = 2 * max_pixel_value # Double the max absolute value
self.ms_ssim.update_state(images, generated_images, max_val)
self.ms_ssim.update_state(images, generated_images, 255)

return {m.name: m.result() for m in self.metrics}

Expand Down

0 comments on commit 3c30897

Please sign in to comment.