Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
models
提交
a82f75be
M
models
项目概览
PaddlePaddle
/
models
大约 1 年 前同步成功
通知
222
Star
6828
Fork
2962
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
602
列表
看板
标记
里程碑
合并请求
255
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
models
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
602
Issue
602
列表
看板
标记
里程碑
合并请求
255
合并请求
255
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
a82f75be
编写于
12月 10, 2019
作者:
K
Kaipeng Deng
提交者:
GitHub
12月 10, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refix point_rcnn elementwise compatible. (#4053)
* refix point_rcnn elementwise compatible. * remove axis=0 in get_reg_loss
上级
0bc89298
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
5 addition
and
6 deletion
+5
-6
PaddleCV/Paddle3D/PointRCNN/models/loss_utils.py
PaddleCV/Paddle3D/PointRCNN/models/loss_utils.py
+1
-2
PaddleCV/Paddle3D/PointRCNN/models/rcnn.py
PaddleCV/Paddle3D/PointRCNN/models/rcnn.py
+2
-2
PaddleCV/Paddle3D/PointRCNN/models/rpn.py
PaddleCV/Paddle3D/PointRCNN/models/rpn.py
+2
-2
未找到文件。
PaddleCV/Paddle3D/PointRCNN/models/loss_utils.py
浏览文件 @
a82f75be
...
...
@@ -191,8 +191,7 @@ def get_reg_loss(pred_reg, reg_label, fg_mask, point_num, loc_scope,
size_res_norm
=
fluid
.
layers
.
reshape
(
size_res_norm
,
shape
=
[
-
1
,
1
],
inplace
=
True
)
size_loss
=
fluid
.
layers
.
smooth_l1
(
size_res_norm
,
size_res_norm_label
)
size_loss
=
fluid
.
layers
.
reshape
(
size_loss
,
shape
=
[
-
1
,
3
])
size_loss
=
fluid
.
layers
.
elementwise_mul
(
size_loss
,
fg_mask
,
axis
=
0
)
size_loss
=
fluid
.
layers
.
reduce_mean
(
size_loss
)
*
fg_scale
size_loss
=
fluid
.
layers
.
reduce_mean
(
size_loss
*
fg_mask
)
*
fg_scale
# Total regression loss
reg_loss_dict
[
'loss_loc'
]
=
loc_loss
...
...
PaddleCV/Paddle3D/PointRCNN/models/rcnn.py
浏览文件 @
a82f75be
...
...
@@ -276,14 +276,14 @@ class RCNN(object):
# RCNN regression loss
reg_out
=
self
.
reg_out
fg_mask
=
fluid
.
layers
.
cast
(
reg_valid_mask
>
0
,
dtype
=
reg_out
.
dtype
)
fg_mask
=
fluid
.
layers
.
unsqueeze
(
fg_mask
,
axes
=
[
1
])
fg_mask
.
stop_gradient
=
True
gt_boxes3d_ct
=
fluid
.
layers
.
reshape
(
gt_boxes3d_ct
,
[
-
1
,
7
])
all_anchor_size
=
roi_size
anchor_size
=
all_anchor_size
[
fg_mask
]
if
self
.
cfg
.
RCNN
.
SIZE_RES_ON_ROI
else
self
.
cfg
.
CLS_MEAN_SIZE
[
0
]
masked_reg_out
=
fluid
.
layers
.
elementwise_mul
(
reg_out
,
fg_mask
,
axis
=
0
)
loc_loss
,
angle_loss
,
size_loss
,
loss_dict
=
get_reg_loss
(
masked_reg_out
,
reg_out
*
fg_mask
,
gt_boxes3d_ct
,
fg_mask
,
point_num
=
float
(
self
.
batch_size
*
64
),
...
...
PaddleCV/Paddle3D/PointRCNN/models/rpn.py
浏览文件 @
a82f75be
...
...
@@ -149,10 +149,10 @@ class RPN(object):
rpn_reg
=
fluid
.
layers
.
reshape
(
rpn_reg
,
[
-
1
,
rpn_reg
.
shape
[
-
1
]])
reg_label
=
fluid
.
layers
.
reshape
(
rpn_reg_label
,
[
-
1
,
rpn_reg_label
.
shape
[
-
1
]])
fg_mask
=
fluid
.
layers
.
cast
(
cls_label_flat
>
0
,
dtype
=
rpn_reg
.
dtype
)
fg_mask
=
fluid
.
layers
.
unsqueeze
(
fg_mask
,
axes
=
[
1
])
fg_mask
.
stop_gradient
=
True
masked_rpn_reg
=
fluid
.
layers
.
elementwise_mul
(
rpn_reg
,
fg_mask
,
axis
=
0
)
loc_loss
,
angle_loss
,
size_loss
,
loss_dict
=
get_reg_loss
(
masked_rpn_reg
,
rpn_reg
*
fg_mask
,
reg_label
,
fg_mask
,
float
(
self
.
batch_size
*
self
.
cfg
.
RPN
.
NUM_POINTS
),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录