From 4556ad76b42cb7abee81d8f53c1bbae2675252dd Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Tue, 1 Dec 2020 10:46:29 +0800 Subject: [PATCH] Upgrade string literals to raw string [part 2](#29217) --- python/paddle/fluid/contrib/optimizer.py | 2 +- python/paddle/fluid/dygraph/nn.py | 2 +- python/paddle/nn/functional/loss.py | 2 +- python/paddle/nn/layer/loss.py | 4 ++-- python/paddle/optimizer/lamb.py | 2 +- python/paddle/vision/ops.py | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/python/paddle/fluid/contrib/optimizer.py b/python/paddle/fluid/contrib/optimizer.py index 347edc8578..968bfa92b5 100644 --- a/python/paddle/fluid/contrib/optimizer.py +++ b/python/paddle/fluid/contrib/optimizer.py @@ -24,7 +24,7 @@ __all__ = ['Momentum'] class Momentum(Optimizer): - """ + r""" Simple Momentum optimizer with velocity state diff --git a/python/paddle/fluid/dygraph/nn.py b/python/paddle/fluid/dygraph/nn.py index 9382f6b8e7..12ea7c5ff6 100644 --- a/python/paddle/fluid/dygraph/nn.py +++ b/python/paddle/fluid/dygraph/nn.py @@ -2979,7 +2979,7 @@ class GroupNorm(layers.Layer): class SpectralNorm(layers.Layer): - """ + r""" This interface is used to construct a callable object of the ``SpectralNorm`` class. For more details, refer to code examples. It implements the function of the Spectral Normalization Layer. This layer calculates the spectral normalization value of weight parameters of diff --git a/python/paddle/nn/functional/loss.py b/python/paddle/nn/functional/loss.py index 7b7521d53a..cc1010772c 100755 --- a/python/paddle/nn/functional/loss.py +++ b/python/paddle/nn/functional/loss.py @@ -1123,7 +1123,7 @@ def cross_entropy(input, soft_label=False, axis=-1, name=None): - """ + r""" This operator implements the cross entropy loss function with softmax. This function combines the calculation of the softmax operation and the cross entropy loss function to provide a more numerically stable gradient. diff --git a/python/paddle/nn/layer/loss.py b/python/paddle/nn/layer/loss.py index 14992d1019..ae5f730f2d 100644 --- a/python/paddle/nn/layer/loss.py +++ b/python/paddle/nn/layer/loss.py @@ -141,7 +141,7 @@ class BCEWithLogitsLoss(fluid.dygraph.Layer): class CrossEntropyLoss(fluid.dygraph.Layer): - """ + r""" This operator implements the cross entropy loss function with softmax. This function combines the calculation of the softmax operation and the cross entropy loss function to provide a more numerically stable gradient. @@ -623,7 +623,7 @@ class BCELoss(fluid.dygraph.Layer): class NLLLoss(fluid.dygraph.Layer): - """ + r""" :alias_main: paddle.nn.NLLLoss :alias: paddle.nn.NLLLoss,paddle.nn.layer.NLLLoss,paddle.nn.layer.loss.NLLLoss diff --git a/python/paddle/optimizer/lamb.py b/python/paddle/optimizer/lamb.py index de62257588..c6275a8230 100644 --- a/python/paddle/optimizer/lamb.py +++ b/python/paddle/optimizer/lamb.py @@ -21,7 +21,7 @@ __all__ = ["Lamb"] class Lamb(Optimizer): - """ + r""" LAMB (Layer-wise Adaptive Moments optimizer for Batching training) Optimizer. LAMB Optimizer is designed to scale up the batch size of training without losing diff --git a/python/paddle/vision/ops.py b/python/paddle/vision/ops.py index 892f3a2581..1fd0b1d717 100644 --- a/python/paddle/vision/ops.py +++ b/python/paddle/vision/ops.py @@ -34,7 +34,7 @@ def yolo_loss(x, use_label_smooth=True, name=None, scale_x_y=1.): - """ + r""" This operator generates YOLOv3 loss based on given predict result and ground truth boxes. @@ -242,7 +242,7 @@ def yolo_box(x, clip_bbox=True, name=None, scale_x_y=1.): - """ + r""" This operator generates YOLO detection boxes from output of YOLOv3 network. -- GitLab