nsl.configs.DistanceConfig

Contains configuration for computing distances between tensors.

distance_type type of distance function. Input type will be converted to the appropriate nsl.configs.DistanceType value (e.g., the value 'l2' is converted to nsl.configs.DistanceType.L2). Defaults to the L2 norm.
reduction type of distance reduction. See tf.compat.v1.losses.Reduction for details. Defaults to tf.losses.Reduction.SUM_BY_NONZERO_WEIGHTS.
sum_over_axis the distance is the sum over the difference along the axis. See nsl.lib.pairwise_distance_wrapper for how this field is used. Defaults to None.
transform_fn type of transform function to be applied on each side before computing the pairwise distance. Input type will be converted to nsl.configs.TransformType when applicable (e.g., the value 'softmax' maps to nsl.configs.TransformType.SOFTMAX). Defaults to 'none'.

Methods

__eq__

Return self==value.

__ge__

Automatically created by attrs.

__gt__

Automatically created by attrs.

__le__

Automatically created by attrs.

__lt__

Automatically created by attrs.

__ne__

Check equality and either forward a NotImplemented or return the result negated.