Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleX
提交
6a4bfdaf
P
PaddleX
项目概览
PaddlePaddle
/
PaddleX
通知
138
Star
4
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
43
列表
看板
标记
里程碑
合并请求
5
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleX
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
43
Issue
43
列表
看板
标记
里程碑
合并请求
5
合并请求
5
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
6a4bfdaf
编写于
8月 06, 2020
作者:
F
FlyingQianMM
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
delete random_seed setting
上级
ed8de1ae
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
4 addition
and
9 deletion
+4
-9
paddlex/cv/models/base.py
paddlex/cv/models/base.py
+0
-2
paddlex/cv/models/yolo_v3.py
paddlex/cv/models/yolo_v3.py
+1
-5
paddlex/cv/nets/detection/ops.py
paddlex/cv/nets/detection/ops.py
+1
-1
paddlex/cv/transforms/cls_transforms.py
paddlex/cv/transforms/cls_transforms.py
+1
-1
paddlex/cv/transforms/seg_transforms.py
paddlex/cv/transforms/seg_transforms.py
+1
-0
未找到文件。
paddlex/cv/models/base.py
浏览文件 @
6a4bfdaf
...
...
@@ -94,8 +94,6 @@ class BaseAPI:
self
.
train_inputs
,
self
.
train_outputs
=
self
.
build_net
(
mode
=
'train'
)
self
.
train_prog
=
fluid
.
default_main_program
()
startup_prog
=
fluid
.
default_startup_program
()
self
.
train_prog
.
random_seed
=
1000
startup_prog
.
random_seed
=
1000
# 构建预测网络
self
.
test_prog
=
fluid
.
Program
()
...
...
paddlex/cv/models/yolo_v3.py
浏览文件 @
6a4bfdaf
...
...
@@ -30,10 +30,6 @@ from .base import BaseAPI
from
collections
import
OrderedDict
from
.utils.detection_eval
import
eval_results
,
bbox2out
import
random
random
.
seed
(
0
)
np
.
random
.
seed
(
0
)
class
YOLOv3
(
BaseAPI
):
"""构建YOLOv3,并实现其训练、评估、预测和模型导出。
...
...
@@ -181,7 +177,7 @@ class YOLOv3(BaseAPI):
model
.
max_width
=
self
.
max_width
inputs
=
model
.
generate_inputs
()
model_out
=
model
.
build_net
(
inputs
)
outputs
=
OrderedDict
([(
'bbox'
,
model_out
[
0
]
)])
outputs
=
OrderedDict
([(
'bbox'
,
model_out
)])
if
mode
==
'train'
:
self
.
optimizer
.
minimize
(
model_out
)
outputs
=
OrderedDict
([(
'loss'
,
model_out
)])
...
...
paddlex/cv/nets/detection/ops.py
浏览文件 @
6a4bfdaf
...
...
@@ -50,7 +50,7 @@ def DropBlock(input, block_size, keep_prob, is_test):
input_shape_tmp
=
fluid
.
layers
.
cast
(
input_shape
,
dtype
=
"int64"
)
random_matrix
=
fluid
.
layers
.
uniform_random
(
input_shape_tmp
,
dtype
=
'float32'
,
min
=
0.0
,
max
=
1.0
,
seed
=
1000
)
input_shape_tmp
,
dtype
=
'float32'
,
min
=
0.0
,
max
=
1.0
)
one_zero_m
=
fluid
.
layers
.
less_than
(
random_matrix
,
p
)
one_zero_m
.
stop_gradient
=
True
one_zero_m
=
fluid
.
layers
.
cast
(
one_zero_m
,
dtype
=
"float32"
)
...
...
paddlex/cv/transforms/cls_transforms.py
浏览文件 @
6a4bfdaf
...
...
@@ -46,7 +46,7 @@ class Compose(ClsTransform):
raise
ValueError
(
'The length of transforms '
+
\
'must be equal or larger than 1!'
)
self
.
transforms
=
transforms
self
.
batch_transforms
=
None
# 检查transforms里面的操作,目前支持PaddleX定义的或者是imgaug操作
for
op
in
self
.
transforms
:
if
not
isinstance
(
op
,
ClsTransform
):
...
...
paddlex/cv/transforms/seg_transforms.py
浏览文件 @
6a4bfdaf
...
...
@@ -49,6 +49,7 @@ class Compose(SegTransform):
raise
ValueError
(
'The length of transforms '
+
\
'must be equal or larger than 1!'
)
self
.
transforms
=
transforms
self
.
batch_transforms
=
None
self
.
to_rgb
=
False
# 检查transforms里面的操作,目前支持PaddleX定义的或者是imgaug操作
for
op
in
self
.
transforms
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录