modbot.utilities.loss_metrics

Custom loss metrics

Functions

gaussian_kernel(x1, x2[, beta])

Gaussian kernel for mmd content loss :param x1: predictions :type x1: tf.tensor :param x2: ground truth :type x2: tf.tensor

max_mean_discrepancy(x1, x2[, beta])

maximum mean discrepancy (MMD) based on Gaussian kernel function for keras models (theano or tensorflow backend) - Gretton, Arthur, et al. "A kernel method for the two-sample-problem." Advances in neural information processing systems.