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__

Method generated by attrs for class DistanceConfig.

__ge__

Method generated by attrs for class DistanceConfig.

__gt__

Method generated by attrs for class DistanceConfig.

__le__

Method generated by attrs for class DistanceConfig.

__lt__

Method generated by attrs for class DistanceConfig.

__ne__

Method generated by attrs for class DistanceConfig.