@@ -3263,35 +3263,35 @@ def smooth_l1(x, y, inside_weight=None, outside_weight=None, sigma=None):
32633263 """
32643264 **Smooth L1 Loss Operator. **
32653265
3266- This operator computes the smooth l1 loss for X and Y.
3266+ This operator computes the smooth L1 loss for X and Y.
32673267 The operator takes the first dimension of X and Y as batch size.
3268- For each instance, it computes the smooth l1 loss element by element first
3268+ For each instance, it computes the smooth L1 loss element by element first
32693269 and then sums all the losses. So the shape of Out is [batch_size, 1].
32703270
32713271 Args:
32723272 x (Variable): A tensor with rank at least 2. The input value of smooth
3273- l1 loss op with shape [batch_size, dim1, ..., dimN].
3273+ L1 loss op with shape [batch_size, dim1, ..., dimN].
32743274 y (Variable): A tensor with rank at least 2. The target value of smooth
3275- l1 loss op with same shape as x.
3275+ L1 loss op with same shape as x.
32763276 inside_weight (Variable|None): A tensor with rank at least 2. This
32773277 input is optional and should have same shape with x. If provided,
32783278 the result of (x - y) will be multiplied by this tensor element by
32793279 element.
32803280 outside_weight (Variable|None): A tensor with rank at least 2. This
32813281 input is optional and should have same shape with x. If provided,
3282- the out smooth l1 loss will be multiplied by this tensor element
3282+ the out smooth L1 loss will be multiplied by this tensor element
32833283 by element.
3284- sigma (float|None): Hyper parameter of smooth l1 loss op. A float scalar
3284+ sigma (float|None): Hyper parameter of smooth L1 loss op. A float scalar
32853285 with default value 1.0.
32863286 Returns:
3287- Variable: A tensor with rank be 2. The output smooth l1 loss with
3287+ Variable: A tensor with rank be 2. The output smooth L1 loss with
32883288 shape [batch_size, 1].
32893289
32903290 Examples:
32913291 .. code-block:: python
32923292
32933293 data = fluid.layers.data(name='data', shape=[128], dtype='float32')
3294- label = fluid.layers.data(name='label', shape=[100], dtype='int64 ')
3294+ label = fluid.layers.data(name='label', shape=[100], dtype='float32 ')
32953295 fc = fluid.layers.fc(input=data, size=100)
32963296 out = fluid.layers.smooth_l1(x=fc, y=label)
32973297 """
0 commit comments