sup3r.utilities.loss_metrics

sup3r.utilities.loss_metrics#

Content loss metrics for Sup3r

Functions

gaussian_kernel(x_true, x_gen[, sigma])

Gaussian kernel for mmd content loss

tf_derivative(x[, axis])

Custom derivative function for compatibility with tensorflow.

Classes

CoarseMseLoss([gen_features, true_features])

Loss class for coarse mse on spatial average of 5D tensor

ExpLoss([gen_features, true_features])

Loss class for squared exponential difference

GeothermalPhysicsLoss([gen_features, ...])

Physics based loss for Geothermal applications

GeothermalPhysicsLossWithObs([gen_features, ...])

Physics based loss for Geothermal applications

LowResLoss([s_enhance, t_enhance, t_method, ...])

Content loss that is calculated by coarsening the synthetic and true high-resolution data pairs and then performing the pointwise content loss on the low-resolution fields

MaterialDerivativeLoss(gen_features)

Loss class for the material derivative.

MmdLoss([gen_features, true_features])

Loss class for max mean discrepancy loss

PerceptualLoss([layer_names])

Perceptual loss that is calculated as MSE between feature maps of ground truth and synthetic data

SlicedWassersteinLoss([n_projections])

Loss class for sliced wasserstein distance loss

SpatialDerivativeLoss([gen_features, ...])

Loss class to encourage accurary of spatial derivatives.

SpatialExtremesLoss([gen_features, ...])

Loss class that encourages accuracy of the min/max values in the spatial domain.

SpatialFftLoss([gen_features, true_features])

Loss class that encourages accuracy of the spatial frequency spectrum

SpatiotemporalFftLoss([gen_features, ...])

Loss class that encourages accuracy of the spatiotemporal frequency spectrum

Sup3rLoss([gen_features, true_features])

Base class for custom sup3r loss metrics.

TemporalDerivativeLoss([gen_features, ...])

Loss class to encourage accurary of temporal derivative.

TemporalExtremesLoss([gen_features, ...])

Loss class that encourages accuracy of the min/max values in the timeseries.