Skip to content

Commit 248487d

Browse files
author
sana
committed
Added IS to model evaluation
1 parent 1f00de9 commit 248487d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ml4h/models/diffusion_blocks.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from keras import layers
1313

1414
from ml4h.defines import IMAGE_EXT
15-
from ml4h.metrics import KernelInceptionDistance
15+
from ml4h.metrics import KernelInceptionDistance, InceptionScore
1616
from ml4h.models.Block import Block
1717
from ml4h.TensorMap import TensorMap
1818

@@ -308,6 +308,7 @@ def compile(self, **kwargs):
308308
self.mae_metric = tf.keras.metrics.MeanAbsoluteError(name="mae")
309309
if self.tensor_map.axes() == 3 and self.inspect_model:
310310
self.kid = KernelInceptionDistance(name = "kid", input_shape = self.tensor_map.shape, kernel_image_size=299)
311+
self.inception_score = InceptionScore(name = "is", input_shape = self.tensor_map.shape, kernel_image_size=299)
311312

312313
@property
313314
def metrics(self):
@@ -666,6 +667,7 @@ def compile(self, **kwargs):
666667
self.supervised_loss_tracker = keras.metrics.Mean(name="supervised_loss")
667668
if self.input_map.axes() == 3 and self.inspect_model:
668669
self.kid = KernelInceptionDistance(name = "kid", input_shape = self.input_map.shape, kernel_image_size=299)
670+
self.inception_score = InceptionScore(name = "is", input_shape = self.input_map.shape, kernel_image_size=299)
669671

670672
@property
671673
def metrics(self):

0 commit comments

Comments
 (0)