sup3r.utilities.loss_metrics.gaussian_kernel

sup3r.utilities.loss_metrics.gaussian_kernel#

gaussian_kernel(x1, x2, sigma=1.0)[source]#

Gaussian kernel for mmd content loss

Parameters:
  • x1 (tf.tensor) – synthetic generator output (n_obs, spatial_1, spatial_2, temporal, features)

  • x2 (tf.tensor) – high resolution data (n_obs, spatial_1, spatial_2, temporal, features)

  • sigma (float) – Standard deviation for gaussian kernel

Returns:

tf.tensor – kernel output tensor

References

Following MMD implementation in lmjohns3/theanets