Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleHub
提交
ede3ecc4
P
PaddleHub
项目概览
PaddlePaddle
/
PaddleHub
1 年多 前同步成功
通知
283
Star
12117
Fork
2091
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
200
列表
看板
标记
里程碑
合并请求
4
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleHub
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
200
Issue
200
列表
看板
标记
里程碑
合并请求
4
合并请求
4
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
ede3ecc4
编写于
4月 29, 2020
作者:
W
wuzewu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix fpn issue in paddle 1.7.x
上级
226d8ca9
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
6 deletion
+10
-6
hub_module/modules/image/object_detection/faster_rcnn_resnet50_coco2017/module.py
.../object_detection/faster_rcnn_resnet50_coco2017/module.py
+5
-3
hub_module/modules/image/object_detection/faster_rcnn_resnet50_fpn_coco2017/module.py
...ect_detection/faster_rcnn_resnet50_fpn_coco2017/module.py
+5
-3
未找到文件。
hub_module/modules/image/object_detection/faster_rcnn_resnet50_coco2017/module.py
浏览文件 @
ede3ecc4
...
...
@@ -89,7 +89,7 @@ class FasterRCNNResNet50(hub.Module):
with
fluid
.
program_guard
(
context_prog
,
startup_program
):
with
fluid
.
unique_name
.
guard
():
image
=
fluid
.
layers
.
data
(
name
=
'image'
,
shape
=
[
3
,
800
,
1333
],
dtype
=
'float32'
)
name
=
'image'
,
shape
=
[
-
1
,
3
,
-
1
,
-
1
],
dtype
=
'float32'
)
# backbone
backbone
=
ResNet
(
norm_type
=
'affine_channel'
,
...
...
@@ -201,9 +201,13 @@ class FasterRCNNResNet50(hub.Module):
place
=
fluid
.
CPUPlace
()
exe
=
fluid
.
Executor
(
place
)
exe
.
run
(
startup_program
)
if
pretrained
:
def
_if_exist
(
var
):
if
num_classes
!=
81
:
if
'bbox_pred'
in
var
.
name
or
'cls_score'
in
var
.
name
:
return
False
return
os
.
path
.
exists
(
os
.
path
.
join
(
self
.
default_pretrained_model_path
,
var
.
name
))
...
...
@@ -212,8 +216,6 @@ class FasterRCNNResNet50(hub.Module):
exe
,
self
.
default_pretrained_model_path
,
predicate
=
_if_exist
)
else
:
exe
.
run
(
startup_program
)
return
inputs
,
outputs
,
context_prog
def
rpn_head
(
self
):
...
...
hub_module/modules/image/object_detection/faster_rcnn_resnet50_fpn_coco2017/module.py
浏览文件 @
ede3ecc4
...
...
@@ -90,7 +90,7 @@ class FasterRCNNResNet50RPN(hub.Module):
with
fluid
.
program_guard
(
context_prog
,
startup_program
):
with
fluid
.
unique_name
.
guard
():
image
=
fluid
.
layers
.
data
(
name
=
'image'
,
shape
=
[
3
,
800
,
1333
],
dtype
=
'float32'
)
name
=
'image'
,
shape
=
[
-
1
,
3
,
-
1
,
-
1
],
dtype
=
'float32'
)
# backbone
backbone
=
ResNet
(
norm_type
=
'affine_channel'
,
...
...
@@ -202,9 +202,13 @@ class FasterRCNNResNet50RPN(hub.Module):
place
=
fluid
.
CPUPlace
()
exe
=
fluid
.
Executor
(
place
)
exe
.
run
(
startup_program
)
if
pretrained
:
def
_if_exist
(
var
):
if
num_classes
!=
81
:
if
'bbox_pred'
in
var
.
name
or
'cls_score'
in
var
.
name
:
return
False
return
os
.
path
.
exists
(
os
.
path
.
join
(
self
.
default_pretrained_model_path
,
var
.
name
))
...
...
@@ -213,8 +217,6 @@ class FasterRCNNResNet50RPN(hub.Module):
exe
,
self
.
default_pretrained_model_path
,
predicate
=
_if_exist
)
else
:
exe
.
run
(
startup_program
)
return
inputs
,
outputs
,
context_prog
def
rpn_head
(
self
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录