jpdefrutos commited on
Commit
c44df3d
·
1 Parent(s): 72fe899

Missing a parenthesis when getting the normalizing factor

Browse files
DeepDeformationMapRegistration/losses.py CHANGED
@@ -26,7 +26,7 @@ class HausdorffDistance:
26
  diff = tf.math.pow(y_pred - y_true, 2)
27
  alpha = 2.
28
 
29
- norm = 1 / self.ndims * 2 + 1
30
  kernel = generate_binary_structure(self.ndims, 1).astype(int) * norm
31
  kernel = tf.constant(kernel, tf.float32)
32
  kernel = tf.expand_dims(tf.expand_dims(kernel, -1), -1)
 
26
  diff = tf.math.pow(y_pred - y_true, 2)
27
  alpha = 2.
28
 
29
+ norm = 1 / (self.ndims * 2 + 1)
30
  kernel = generate_binary_structure(self.ndims, 1).astype(int) * norm
31
  kernel = tf.constant(kernel, tf.float32)
32
  kernel = tf.expand_dims(tf.expand_dims(kernel, -1), -1)