Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
4e26fa57
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2298
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
4e26fa57
编写于
2月 24, 2022
作者:
L
Leo Chen
提交者:
GitHub
2月 24, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix 'invalid escape sequence' (#39842)
* fix 'invalid escape sequence' * fix assert error
上级
7a7a7cad
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
19 addition
and
19 deletion
+19
-19
python/paddle/distributed/auto_parallel/cost_model.py
python/paddle/distributed/auto_parallel/cost_model.py
+2
-2
python/paddle/incubate/nn/functional/fused_transformer.py
python/paddle/incubate/nn/functional/fused_transformer.py
+2
-2
python/paddle/nn/functional/loss.py
python/paddle/nn/functional/loss.py
+1
-1
python/paddle/nn/functional/pooling.py
python/paddle/nn/functional/pooling.py
+3
-3
python/paddle/nn/initializer/dirac.py
python/paddle/nn/initializer/dirac.py
+1
-1
python/paddle/nn/layer/common.py
python/paddle/nn/layer/common.py
+1
-1
python/paddle/nn/layer/pooling.py
python/paddle/nn/layer/pooling.py
+3
-3
python/paddle/signal.py
python/paddle/signal.py
+2
-2
python/paddle/tensor/random.py
python/paddle/tensor/random.py
+2
-2
python/paddle/vision/ops.py
python/paddle/vision/ops.py
+2
-2
未找到文件。
python/paddle/distributed/auto_parallel/cost_model.py
浏览文件 @
4e26fa57
...
...
@@ -426,7 +426,7 @@ class CostModel(object):
return
merged_node_id
,
merged_node
def
merge_linear
(
self
):
'''
r
'''
This method does the following:
If X depends on Y only, they must be run sequentially.
[ e.g. A ->- C ->- D D and E depends on C only.]
...
...
@@ -442,7 +442,7 @@ class CostModel(object):
return
cnt
def
merge_branch
(
self
):
'''
r
'''
This method does the following:
If a node has more than one successor, there is *branch*.
[ e.g. A ->- B ->- D ]
...
...
python/paddle/incubate/nn/functional/fused_transformer.py
浏览文件 @
4e26fa57
...
...
@@ -46,7 +46,7 @@ def fused_feedforward(x,
training
=
True
,
mode
=
'upscale_in_train'
,
name
=
None
):
"""
r
"""
This is a fusion operator to compute feed forward layer in transformer model architecture.
This operator only supports running on GPU. The function of the operator is consistent with
the following pseudo code:
...
...
@@ -230,7 +230,7 @@ def fused_multi_head_attention(x,
training
=
True
,
mode
=
'upscale_in_train'
,
name
=
None
):
"""
r
"""
Attention mapps queries and a set of key-value pairs to outputs, and
Multi-Head Attention performs multiple parallel attention to jointly attending
to information from different representation subspaces. This API only
...
...
python/paddle/nn/functional/loss.py
浏览文件 @
4e26fa57
...
...
@@ -1113,7 +1113,7 @@ def margin_cross_entropy(logits,
group
=
None
,
return_softmax
=
False
,
reduction
=
'mean'
):
"""
r
"""
.. math::
L=-\\frac{1}{N}\sum^N_{i=1}\log\\frac{e^{s(cos(m_{1}\\theta_{y_i}+m_{2})-m_{3})}}{e^{s(cos(m_{1}\\theta_{y_i}+m_{2})-m_{3})}+\sum^n_{j=1,j\\neq y_i} e^{scos\\theta_{y_i}}}
...
...
python/paddle/nn/functional/pooling.py
浏览文件 @
4e26fa57
...
...
@@ -670,7 +670,7 @@ def max_unpool1d(x,
data_format
=
"NCL"
,
output_size
=
None
,
name
=
None
):
"""
r
"""
This API implements max unpooling 1d opereation.
`max_unpool1d` accepts the output of `max_pool1d` as input,
including the indices of the maximum value and calculate the partial inverse.
...
...
@@ -779,7 +779,7 @@ def max_unpool2d(x,
data_format
=
"NCHW"
,
output_size
=
None
,
name
=
None
):
"""
r
"""
This API implements max unpooling 2d opereation.
See more details in :ref:`api_nn_pooling_MaxUnPool2D` .
...
...
@@ -894,7 +894,7 @@ def max_unpool3d(x,
data_format
=
"NCDHW"
,
output_size
=
None
,
name
=
None
):
"""
r
"""
This API implements max unpooling 3d opereation.
`max_unpool3d` accepts the output of `max_pool3d` as input,
including the indices of the maximum value and calculate the partial inverse.
...
...
python/paddle/nn/initializer/dirac.py
浏览文件 @
4e26fa57
...
...
@@ -23,7 +23,7 @@ __all__ = []
class
Dirac
(
Initializer
):
"""Initialize the 3D/4D/5D Tensor with Dirac delta function.
r
"""Initialize the 3D/4D/5D Tensor with Dirac delta function.
It can reserve the feature of convolution layer input, which means that
as many channels are reserved as possible.
...
...
python/paddle/nn/layer/common.py
浏览文件 @
4e26fa57
...
...
@@ -1554,7 +1554,7 @@ class Unfold(Layer):
class
Fold
(
Layer
):
"""
r
"""
This Op is used to combines an array of sliding local blocks into a large containing
tensor. also known as col2im when operated on batched 2D image tensor. Fold calculates each
...
...
python/paddle/nn/layer/pooling.py
浏览文件 @
4e26fa57
...
...
@@ -1131,7 +1131,7 @@ class AdaptiveMaxPool3D(Layer):
class
MaxUnPool1D
(
Layer
):
"""
r
"""
This API implements max unpooling 1d opereation.
`max_unpool1d` accepts the output of `max_pool1d` as input,
...
...
@@ -1213,7 +1213,7 @@ class MaxUnPool1D(Layer):
class
MaxUnPool2D
(
Layer
):
"""
r
"""
This API implements max unpooling 2d opereation.
'max_unpool2d' accepts the output of 'max_unpool2d' as input
...
...
@@ -1299,7 +1299,7 @@ class MaxUnPool2D(Layer):
class
MaxUnPool3D
(
Layer
):
"""
r
"""
This API implements max unpooling 3d opereation.
`max_unpool3d` accepts the output of `max_pool3d` as input,
...
...
python/paddle/signal.py
浏览文件 @
4e26fa57
...
...
@@ -243,7 +243,7 @@ def stft(x,
normalized
=
False
,
onesided
=
True
,
name
=
None
):
"""
r
"""
Short-time Fourier transform (STFT).
The STFT computes the discrete Fourier transforms (DFT) of short overlapping
...
...
@@ -398,7 +398,7 @@ def istft(x,
length
=
None
,
return_complex
=
False
,
name
=
None
):
"""
r
"""
Inverse short-time Fourier transform (ISTFT).
Reconstruct time-domain signal from the giving complex input and window tensor when
...
...
python/paddle/tensor/random.py
浏览文件 @
4e26fa57
...
...
@@ -81,7 +81,7 @@ def bernoulli(x, name=None):
def
poisson
(
x
,
name
=
None
):
"""
r
"""
This OP returns a tensor filled with random number from a Poisson Distribution.
.. math::
...
...
@@ -984,7 +984,7 @@ def rand(shape, dtype=None, name=None):
def
exponential_
(
x
,
lam
=
1.0
,
name
=
None
):
"""
r
"""
This inplace OP fill input Tensor ``x`` with random number from a Exponential Distribution.
``lam`` is :math:`\lambda` parameter of Exponential Distribution.
...
...
python/paddle/vision/ops.py
浏览文件 @
4e26fa57
...
...
@@ -949,8 +949,8 @@ def psroi_pool(x, boxes, boxes_num, output_size, spatial_scale=1.0, name=None):
if
isinstance
(
output_size
,
int
):
output_size
=
(
output_size
,
output_size
)
pooled_height
,
pooled_width
=
output_size
assert
(
len
(
x
.
shape
)
==
4
,
"Input features with shape should be (N, C, H, W)"
)
assert
len
(
x
.
shape
)
==
4
,
\
"Input features with shape should be (N, C, H, W)"
output_channels
=
int
(
x
.
shape
[
1
]
/
(
pooled_height
*
pooled_width
))
if
in_dygraph_mode
():
return
_C_ops
.
psroi_pool
(
x
,
boxes
,
boxes_num
,
"output_channels"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录