From 37190b7c1455de51f0d89f2f12581d41b041b075 Mon Sep 17 00:00:00 2001 From: caoying03 Date: Fri, 17 Nov 2017 18:08:57 +0800 Subject: [PATCH] small fix. --- python/paddle/trainer_config_helpers/layers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/trainer_config_helpers/layers.py b/python/paddle/trainer_config_helpers/layers.py index 5b39a65d8..14cdee4c5 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, -- GitLab