@@ -3263,35 +3263,35 @@ def smooth_l1(x, y, inside_weight=None, outside_weight=None, sigma=None):
3263
3263
"""
3264
3264
**Smooth L1 Loss Operator. **
3265
3265
3266
- This operator computes the smooth l1 loss for X and Y.
3266
+ This operator computes the smooth L1 loss for X and Y.
3267
3267
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
3269
3269
and then sums all the losses. So the shape of Out is [batch_size, 1].
3270
3270
3271
3271
Args:
3272
3272
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].
3274
3274
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.
3276
3276
inside_weight (Variable|None): A tensor with rank at least 2. This
3277
3277
input is optional and should have same shape with x. If provided,
3278
3278
the result of (x - y) will be multiplied by this tensor element by
3279
3279
element.
3280
3280
outside_weight (Variable|None): A tensor with rank at least 2. This
3281
3281
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
3283
3283
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
3285
3285
with default value 1.0.
3286
3286
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
3288
3288
shape [batch_size, 1].
3289
3289
3290
3290
Examples:
3291
3291
.. code-block:: python
3292
3292
3293
3293
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 ')
3295
3295
fc = fluid.layers.fc(input=data, size=100)
3296
3296
out = fluid.layers.smooth_l1(x=fc, y=label)
3297
3297
"""
0 commit comments