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 70363ad commit e12001a
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 @@ -886,7 +886,7 @@ def test_step(self, batch):
num_images=self.batch_size, diffusion_steps=20
)
self.kid.update_state(images, generated_images)
max_pixel_value = tf.reduce_max(tf.abs(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)

Expand Down

0 comments on commit e12001a

Please sign in to comment.