提交 ea2a34ee 编写于 作者: M minqiyang

Polish doc

test=develop
上级 5fff20c2
...@@ -9182,19 +9182,19 @@ def psroi_pool(input, ...@@ -9182,19 +9182,19 @@ def psroi_pool(input,
def huber_loss(input, label, delta): def huber_loss(input, label, delta):
""" """
Huber regression loss is a loss function used in robust regression. Huber loss is a loss function used in robust.
Huber regression loss can evaluate the fitness of input to label. Huber loss can evaluate the fitness of input to label.
Different from MSE loss, Huber regression loss is more robust for outliers. Different from MSE loss, Huber loss is more robust for outliers.
When the difference between input and label is large than delta When the difference between input and label is large than delta
.. math:: .. math::
huber\_regression\_loss = delta * (label - input) - 0.5 * delta * delta huber\_loss = delta * (label - input) - 0.5 * delta * delta
When the difference between input and label is less than delta When the difference between input and label is less than delta
.. math:: .. math::
huber\_regression\_loss = 0.5 * (label - input) * (label - input) huber\_loss = 0.5 * (label - input) * (label - input)
Args: Args:
...@@ -9202,11 +9202,11 @@ def huber_loss(input, label, delta): ...@@ -9202,11 +9202,11 @@ def huber_loss(input, label, delta):
The first dimension is batch size, and the last dimension is 1. The first dimension is batch size, and the last dimension is 1.
label (Variable): The groud truth whose first dimension is batch size label (Variable): The groud truth whose first dimension is batch size
and last dimension is 1. and last dimension is 1.
delta (float): The parameter of huber regression loss, which controls delta (float): The parameter of huber loss, which controls
the range of outliers the range of outliers
Returns: Returns:
huber\_regression\_loss (Variable): The huber regression loss with shape [batch_size, 1]. huber\_loss (Variable): The huber loss with shape [batch_size, 1].
Examples: Examples:
.. code-block:: python .. code-block:: python
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册