提交 37190b7c 编写于 作者: C caoying03

small fix.

上级 29fc94b2
...@@ -2341,7 +2341,7 @@ def cos_sim(a, b, scale=1, size=1, name=None, layer_attr=None): ...@@ -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): def l2_distance_layer(x, y, name=None, layer_attr=None):
""" """
This layer calculates and returns the Euclidean distance between two input 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:: .. math::
l2_distance(\\mathbf{x}, \\mathbf{y}) = \\sqrt{\\sum_{i=1}^D(x_i - y_i)} 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): ...@@ -2372,7 +2372,7 @@ def l2_distance_layer(x, y, name=None, layer_attr=None):
:rtype: LayerOutput :rtype: LayerOutput
""" """
assert isinstance(x, LayerOutput) and isinstance(x, LayerOutput) assert isinstance(x, LayerOutput) and isinstance(y, LayerOutput)
Layer( Layer(
name=name, name=name,
type=LayerType.L2_DISTANCE, type=LayerType.L2_DISTANCE,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册