dgs.models.metric.metric.NegativeSoftmaxEuclideanSquaredDistance

class dgs.models.metric.metric.NegativeSoftmaxEuclideanSquaredDistance(*args: Any, **kwargs: Any)[source]

Class to compute the Softmax distribution of the negative squared Euclidean distance.

Keyword Arguments:

softmax_dim (int) – The dimension along which to compute the softmax.

__init__(*args, softmax_dim: int = -1, **kwargs)[source]

Methods

forward(input1, input2)

First compute the squared Euclidean distance between the two inputs.