diff --git a/python/paddle/trainer_config_helpers/layers.py b/python/paddle/trainer_config_helpers/layers.py index 5b39a65d8cbec7046dc8af1be668bed6c9aea5b5..14cdee4c5564f7a1cc4ff7a19f4f7ac02b08f21c 100644 --- a/python/paddle/trainer_config_helpers/layers.py +++ b/python/paddle/trainer_config_helpers/layers.py @@ -2341,7 +2341,7 @@ def cos_sim(a, b, scale=1, size=1, name=None, layer_attr=None): def l2_distance_layer(x, y, name=None, layer_attr=None): """ This layer calculates and returns the Euclidean distance between two input - vectors a and b. The equation is as follows: + vectors x and y. The equation is as follows: .. math:: l2_distance(\\mathbf{x}, \\mathbf{y}) = \\sqrt{\\sum_{i=1}^D(x_i - y_i)} @@ -2372,7 +2372,7 @@ def l2_distance_layer(x, y, name=None, layer_attr=None): :rtype: LayerOutput """ - assert isinstance(x, LayerOutput) and isinstance(x, LayerOutput) + assert isinstance(x, LayerOutput) and isinstance(y, LayerOutput) Layer( name=name, type=LayerType.L2_DISTANCE,