提交 929efdc5 编写于 作者: C caoying03

follow comments.

上级 4772b78c
......@@ -3338,7 +3338,7 @@ class CosSimLayer(LayerBase):
config_assert(len(self.inputs) == 2, 'CosSimLayer must have 2 inputs')
config_assert(
self.get_input_layer(0).size == self.get_input_layer(1).size,
'inputs of CosSimLayer must have same dim')
'The two inputs of CosSimLayer must have the same dimensionality.')
self.config.cos_scale = cos_scale
......
......@@ -2338,7 +2338,7 @@ def cos_sim(a, b, scale=1, size=1, name=None, layer_attr=None):
@layer_support()
def l2_distance_layer(x, y, name=None, layer_attr=None):
"""
This layer calculate and return 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:
.. math::
......@@ -2374,7 +2374,7 @@ def l2_distance_layer(x, y, name=None, layer_attr=None):
Layer(
name=name,
type=LayerType.L2_DISTANCE,
inputs=[x.name, x.name],
inputs=[x.name, y.name],
**ExtraLayerAttribute.to_kwargs(layer_attr))
return LayerOutput(name, LayerType.L2_DISTANCE, parents=[x, y], size=1)
......
......@@ -20,7 +20,7 @@ layers {
input_layer_name: "x"
}
inputs {
input_layer_name: "x"
input_layer_name: "y"
}
}
input_layer_names: "x"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册