Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
20ff7404
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看板
未验证
提交
20ff7404
编写于
2月 08, 2023
作者:
F
Feng Ni
提交者:
GitHub
2月 08, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix ppyoloe_contrast_head inherit (#7709)
上级
e3ec5d0f
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
8 addition
and
10 deletion
+8
-10
ppdet/modeling/heads/ppyoloe_contrast_head.py
ppdet/modeling/heads/ppyoloe_contrast_head.py
+8
-10
未找到文件。
ppdet/modeling/heads/ppyoloe_contrast_head.py
浏览文件 @
20ff7404
...
@@ -17,14 +17,10 @@ import paddle.nn as nn
...
@@ -17,14 +17,10 @@ import paddle.nn as nn
import
paddle.nn.functional
as
F
import
paddle.nn.functional
as
F
from
ppdet.core.workspace
import
register
from
ppdet.core.workspace
import
register
from
..bbox_utils
import
batch_distance2bbox
from
..initializer
import
bias_init_with_prob
,
constant_
from
..losses
import
GIoULoss
from
..initializer
import
bias_init_with_prob
,
constant_
,
normal_
from
..assigners.utils
import
generate_anchors_for_grid_cell
from
..assigners.utils
import
generate_anchors_for_grid_cell
from
ppdet.modeling.backbones.cspresnet
import
ConvBNLayer
from
ppdet.modeling.ops
import
get_static_shape
,
get_act_fn
from
ppdet.modeling.layers
import
MultiClassNMS
from
ppdet.modeling.heads.ppyoloe_head
import
PPYOLOEHead
from
ppdet.modeling.heads.ppyoloe_head
import
PPYOLOEHead
__all__
=
[
'PPYOLOEContrastHead'
]
__all__
=
[
'PPYOLOEContrastHead'
]
...
@@ -32,7 +28,7 @@ __all__ = ['PPYOLOEContrastHead']
...
@@ -32,7 +28,7 @@ __all__ = ['PPYOLOEContrastHead']
class
PPYOLOEContrastHead
(
PPYOLOEHead
):
class
PPYOLOEContrastHead
(
PPYOLOEHead
):
__shared__
=
[
__shared__
=
[
'num_classes'
,
'eval_size'
,
'trt'
,
'exclude_nms'
,
'num_classes'
,
'eval_size'
,
'trt'
,
'exclude_nms'
,
'exclude_post_process'
,
'use_shared_conv'
'exclude_post_process'
,
'use_shared_conv'
,
'for_distill'
]
]
__inject__
=
[
'static_assigner'
,
'assigner'
,
'nms'
,
'contrast_loss'
]
__inject__
=
[
'static_assigner'
,
'assigner'
,
'nms'
,
'contrast_loss'
]
...
@@ -58,15 +54,17 @@ class PPYOLOEContrastHead(PPYOLOEHead):
...
@@ -58,15 +54,17 @@ class PPYOLOEContrastHead(PPYOLOEHead):
'dfl'
:
0.5
,
'dfl'
:
0.5
,
},
},
trt
=
False
,
trt
=
False
,
attn_conv
=
'convbn'
,
exclude_nms
=
False
,
exclude_nms
=
False
,
exclude_post_process
=
False
,
exclude_post_process
=
False
,
use_shared_conv
=
True
):
use_shared_conv
=
True
,
for_distill
=
False
):
super
().
__init__
(
in_channels
,
num_classes
,
act
,
fpn_strides
,
super
().
__init__
(
in_channels
,
num_classes
,
act
,
fpn_strides
,
grid_cell_scale
,
grid_cell_offset
,
reg_max
,
reg_range
,
grid_cell_scale
,
grid_cell_offset
,
reg_max
,
reg_range
,
static_assigner_epoch
,
use_varifocal_loss
,
static_assigner_epoch
,
use_varifocal_loss
,
static_assigner
,
assigner
,
nms
,
eval_size
,
loss_weight
,
static_assigner
,
assigner
,
nms
,
eval_size
,
loss_weight
,
trt
,
exclude_nms
,
exclude_post_process
,
trt
,
attn_conv
,
exclude_nms
,
exclude_post_process
,
use_shared_conv
)
use_shared_conv
,
for_distill
)
assert
len
(
in_channels
)
>
0
,
"len(in_channels) should > 0"
assert
len
(
in_channels
)
>
0
,
"len(in_channels) should > 0"
self
.
contrast_loss
=
contrast_loss
self
.
contrast_loss
=
contrast_loss
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录