Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
3e177b9d
P
PaddleDetection
项目概览
s920243400
/
PaddleDetection
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleDetection
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
3e177b9d
编写于
5月 30, 2018
作者:
W
walloollaw
提交者:
qingqing01
5月 30, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ISSUE-10996: support name setting for layers topk/softmax/concat/dropout (#10999)
上级
60783a75
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
4 deletion
+10
-4
python/paddle/fluid/layers/nn.py
python/paddle/fluid/layers/nn.py
+7
-3
python/paddle/fluid/layers/tensor.py
python/paddle/fluid/layers/tensor.py
+3
-1
未找到文件。
python/paddle/fluid/layers/nn.py
浏览文件 @
3e177b9d
...
...
@@ -855,7 +855,7 @@ def cos_sim(X, Y):
return
out
def
dropout
(
x
,
dropout_prob
,
is_test
=
False
,
seed
=
None
):
def
dropout
(
x
,
dropout_prob
,
is_test
=
False
,
seed
=
None
,
name
=
None
):
"""
Computes dropout.
...
...
@@ -873,6 +873,8 @@ def dropout(x, dropout_prob, is_test=False, seed=None):
parameter is set to None, a random seed is used.
NOTE: If an integer seed is given, always the same output
units will be dropped. DO NOT use a fixed seed in training.
name(str|None): A name for this layer(optional). If set None, the layer
will be named automatically.
Returns:
Variable: A tensor variable.
...
...
@@ -1117,7 +1119,7 @@ def sequence_softmax(input, param_attr=None, bias_attr=None, use_cudnn=True):
return
softmax_out
def
softmax
(
input
,
param_attr
=
None
,
bias_attr
=
None
,
use_cudnn
=
True
):
def
softmax
(
input
,
param_attr
=
None
,
bias_attr
=
None
,
use_cudnn
=
True
,
name
=
None
):
helper
=
LayerHelper
(
'softmax'
,
**
locals
())
dtype
=
helper
.
input_dtype
()
softmax_out
=
helper
.
create_tmp_variable
(
dtype
)
...
...
@@ -2610,7 +2612,7 @@ def matmul(x, y, transpose_x=False, transpose_y=False, name=None):
return
out
def
topk
(
input
,
k
):
def
topk
(
input
,
k
,
name
=
None
):
"""
This operator is used to find values and indices of the k largest entries
for the last dimension.
...
...
@@ -2626,6 +2628,8 @@ def topk(input, k):
input(Variable): The input variable which can be a vector or Tensor with
higher rank.
k(int): An integer value to specify the top k largest elements.
name(str|None): A name for this layer(optional). If set None, the layer
will be named automatically.
Returns:
values(Variable): The k largest elements along each last dimensional
...
...
python/paddle/fluid/layers/tensor.py
浏览文件 @
3e177b9d
...
...
@@ -112,7 +112,7 @@ def cast(x, dtype):
return
out
def
concat
(
input
,
axis
=
0
):
def
concat
(
input
,
axis
=
0
,
name
=
None
):
"""
**Concat**
...
...
@@ -122,6 +122,8 @@ def concat(input, axis=0):
Args:
input(list): List of tensors to be concatenated
axis(int): Integer axis along which the tensors will be concatenated
name(str|None): A name for this layer(optional). If set None, the layer
will be named automatically.
Returns:
Variable: Output variable of the concatenation
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录