Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
aaf75627
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
大约 1 年 前同步成功
通知
695
Star
11112
Fork
2696
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
184
列表
看板
标记
里程碑
合并请求
40
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
184
Issue
184
列表
看板
标记
里程碑
合并请求
40
合并请求
40
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
aaf75627
编写于
1月 28, 2019
作者:
J
jerrywgz
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove inplace arg, test=develop
上级
e60c8438
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
3 addition
and
13 deletion
+3
-13
paddle/fluid/API.spec
paddle/fluid/API.spec
+1
-1
python/paddle/fluid/layers/detection.py
python/paddle/fluid/layers/detection.py
+2
-12
未找到文件。
paddle/fluid/API.spec
浏览文件 @
aaf75627
...
@@ -324,7 +324,7 @@ paddle.fluid.layers.iou_similarity ArgSpec(args=['x', 'y', 'name'], varargs=None
...
@@ -324,7 +324,7 @@ paddle.fluid.layers.iou_similarity ArgSpec(args=['x', 'y', 'name'], varargs=None
paddle.fluid.layers.box_coder ArgSpec(args=['prior_box', 'prior_box_var', 'target_box', 'code_type', 'box_normalized', 'name'], varargs=None, keywords=None, defaults=('encode_center_size', True, None))
paddle.fluid.layers.box_coder ArgSpec(args=['prior_box', 'prior_box_var', 'target_box', 'code_type', 'box_normalized', 'name'], varargs=None, keywords=None, defaults=('encode_center_size', True, None))
paddle.fluid.layers.polygon_box_transform ArgSpec(args=['input', 'name'], varargs=None, keywords=None, defaults=(None,))
paddle.fluid.layers.polygon_box_transform ArgSpec(args=['input', 'name'], varargs=None, keywords=None, defaults=(None,))
paddle.fluid.layers.yolov3_loss ArgSpec(args=['x', 'gtbox', 'gtlabel', 'anchors', 'class_num', 'ignore_thresh', 'loss_weight_xy', 'loss_weight_wh', 'loss_weight_conf_target', 'loss_weight_conf_notarget', 'loss_weight_class', 'name'], varargs=None, keywords=None, defaults=(None, None, None, None, None, None))
paddle.fluid.layers.yolov3_loss ArgSpec(args=['x', 'gtbox', 'gtlabel', 'anchors', 'class_num', 'ignore_thresh', 'loss_weight_xy', 'loss_weight_wh', 'loss_weight_conf_target', 'loss_weight_conf_notarget', 'loss_weight_class', 'name'], varargs=None, keywords=None, defaults=(None, None, None, None, None, None))
paddle.fluid.layers.box_clip ArgSpec(args=['input', 'im_info', '
inplace', 'name'], varargs=None, keywords=None, defaults=(False, None
))
paddle.fluid.layers.box_clip ArgSpec(args=['input', 'im_info', '
name'], varargs=None, keywords=None, defaults=(None,
))
paddle.fluid.layers.accuracy ArgSpec(args=['input', 'label', 'k', 'correct', 'total'], varargs=None, keywords=None, defaults=(1, None, None))
paddle.fluid.layers.accuracy ArgSpec(args=['input', 'label', 'k', 'correct', 'total'], varargs=None, keywords=None, defaults=(1, None, None))
paddle.fluid.layers.auc ArgSpec(args=['input', 'label', 'curve', 'num_thresholds', 'topk', 'slide_steps'], varargs=None, keywords=None, defaults=('ROC', 4095, 1, 1))
paddle.fluid.layers.auc ArgSpec(args=['input', 'label', 'curve', 'num_thresholds', 'topk', 'slide_steps'], varargs=None, keywords=None, defaults=('ROC', 4095, 1, 1))
paddle.fluid.layers.exponential_decay ArgSpec(args=['learning_rate', 'decay_steps', 'decay_rate', 'staircase'], varargs=None, keywords=None, defaults=(False,))
paddle.fluid.layers.exponential_decay ArgSpec(args=['learning_rate', 'decay_steps', 'decay_rate', 'staircase'], varargs=None, keywords=None, defaults=(False,))
...
...
python/paddle/fluid/layers/detection.py
浏览文件 @
aaf75627
...
@@ -1963,7 +1963,7 @@ def generate_proposals(scores,
...
@@ -1963,7 +1963,7 @@ def generate_proposals(scores,
return
rpn_rois
,
rpn_roi_probs
return
rpn_rois
,
rpn_roi_probs
def
box_clip
(
input
,
im_info
,
inplace
=
False
,
name
=
None
):
def
box_clip
(
input
,
im_info
,
name
=
None
):
"""
"""
Clip the box into the size given by im_info
Clip the box into the size given by im_info
For each input box, The formula is given as follows:
For each input box, The formula is given as follows:
...
@@ -1988,15 +1988,6 @@ def box_clip(input, im_info, inplace=False, name=None):
...
@@ -1988,15 +1988,6 @@ def box_clip(input, im_info, inplace=False, name=None):
layout (height, width, scale). height and width
layout (height, width, scale). height and width
is the input size and scale is the ratio of input
is the input size and scale is the ratio of input
size and original size.
size and original size.
inplace(bool): Must use :attr:`False` if :attr:`input` is used in
multiple operators. If this flag is set :attr:`True`,
reuse input :attr:`input` to clip, which will
change the value of tensor variable :attr:`input`
and might cause errors when :attr:`input` is used
in multiple operators. If :attr:`False`, preserve the
value pf :attr:`input` and create a new output
tensor variable whose data is copied from input x but
cliped.
name (str): The name of this layer. It is optional.
name (str): The name of this layer. It is optional.
Returns:
Returns:
...
@@ -2013,8 +2004,7 @@ def box_clip(input, im_info, inplace=False, name=None):
...
@@ -2013,8 +2004,7 @@ def box_clip(input, im_info, inplace=False, name=None):
"""
"""
helper
=
LayerHelper
(
"box_clip"
,
**
locals
())
helper
=
LayerHelper
(
"box_clip"
,
**
locals
())
output
=
x
if
inplace
else
helper
.
create_variable_for_type_inference
(
\
output
=
helper
.
create_variable_for_type_inference
(
dtype
=
input
.
dtype
)
dtype
=
input
.
dtype
)
inputs
=
{
"Input"
:
input
,
"ImInfo"
:
im_info
}
inputs
=
{
"Input"
:
input
,
"ImInfo"
:
im_info
}
helper
.
append_op
(
type
=
"box_clip"
,
inputs
=
inputs
,
outputs
=
{
"Output"
:
output
})
helper
.
append_op
(
type
=
"box_clip"
,
inputs
=
inputs
,
outputs
=
{
"Output"
:
output
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录