transport.samples.kernels.streaming_sqeuclid.compute_bias_f
def compute_bias_f(g: torch.Tensor, beta: torch.Tensor, delta: torch.Tensor, eps: float) -> torch.TensorCompute pre-scaled bias for f-update: u = (ĝ + δ)/ε.
Args:
g: Current g potential [m]
beta: Target squared norms [m] = cost_scale * ||y||²
delta: Scaled log target weights [m] = eps * log(b)
eps: Regularization parameter
Returns:
u: Pre-scaled bias [m] = (g - beta + delta) / eps
Source: torchmatch/transport/samples/kernels/streaming_sqeuclid.py:109