Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleSeg
提交
5d0a6b72
P
PaddleSeg
项目概览
PaddlePaddle
/
PaddleSeg
通知
285
Star
8
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
53
列表
看板
标记
里程碑
合并请求
3
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleSeg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
53
Issue
53
列表
看板
标记
里程碑
合并请求
3
合并请求
3
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
5d0a6b72
编写于
8月 26, 2020
作者:
C
chenguowei01
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update benchmark
上级
c5345b50
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
12 addition
and
51 deletion
+12
-51
dygraph/benchmark/deeplabv3p.py
dygraph/benchmark/deeplabv3p.py
+6
-9
dygraph/benchmark/hrnet.py
dygraph/benchmark/hrnet.py
+6
-8
dygraph/models/__init__.py
dygraph/models/__init__.py
+0
-33
dygraph/train.py
dygraph/train.py
+0
-1
未找到文件。
dygraph/benchmark/deeplabv3p.py
浏览文件 @
5d0a6b72
...
@@ -19,7 +19,8 @@ from paddle.fluid.dygraph.parallel import ParallelEnv
...
@@ -19,7 +19,8 @@ from paddle.fluid.dygraph.parallel import ParallelEnv
from
dygraph.datasets
import
DATASETS
from
dygraph.datasets
import
DATASETS
import
dygraph.transforms
as
T
import
dygraph.transforms
as
T
from
dygraph.models
import
MODELS
#from dygraph.models import MODELS
from
dygraph.cvlibs
import
manager
from
dygraph.utils
import
get_environ_info
from
dygraph.utils
import
get_environ_info
from
dygraph.utils
import
logger
from
dygraph.utils
import
logger
from
dygraph.core
import
train
from
dygraph.core
import
train
...
@@ -33,7 +34,7 @@ def parse_args():
...
@@ -33,7 +34,7 @@ def parse_args():
'--model_name'
,
'--model_name'
,
dest
=
'model_name'
,
dest
=
'model_name'
,
help
=
'Model type for training, which is one of {}'
.
format
(
help
=
'Model type for training, which is one of {}'
.
format
(
str
(
list
(
MODELS
.
keys
()))),
str
(
list
(
manager
.
MODELS
.
components_dict
.
keys
()))),
type
=
str
,
type
=
str
,
default
=
'UNet'
)
default
=
'UNet'
)
...
@@ -161,18 +162,15 @@ def main(args):
...
@@ -161,18 +162,15 @@ def main(args):
eval_dataset
=
None
eval_dataset
=
None
if
args
.
do_eval
:
if
args
.
do_eval
:
eval_transforms
=
T
.
Compose
(
eval_transforms
=
T
.
Compose
(
[
T
.
Resize
(
args
.
input_size
),
[
T
.
Padding
((
2049
,
1025
)
),
T
.
Normalize
()])
T
.
Normalize
()])
eval_dataset
=
dataset
(
eval_dataset
=
dataset
(
dataset_root
=
args
.
dataset_root
,
dataset_root
=
args
.
dataset_root
,
transforms
=
eval_transforms
,
transforms
=
eval_transforms
,
mode
=
'val'
)
mode
=
'val'
)
if
args
.
model_name
not
in
MODELS
:
model
=
manager
.
MODELS
[
args
.
model_name
](
raise
Exception
(
num_classes
=
train_dataset
.
num_classes
)
'`--model_name` is invalid. it should be one of {}'
.
format
(
str
(
list
(
MODELS
.
keys
()))))
model
=
MODELS
[
args
.
model_name
](
num_classes
=
train_dataset
.
num_classes
)
# Creat optimizer
# Creat optimizer
# todo, may less one than len(loader)
# todo, may less one than len(loader)
...
@@ -195,7 +193,6 @@ def main(args):
...
@@ -195,7 +193,6 @@ def main(args):
save_dir
=
args
.
save_dir
,
save_dir
=
args
.
save_dir
,
iters
=
args
.
iters
,
iters
=
args
.
iters
,
batch_size
=
args
.
batch_size
,
batch_size
=
args
.
batch_size
,
pretrained_model
=
args
.
pretrained_model
,
resume_model
=
args
.
resume_model
,
resume_model
=
args
.
resume_model
,
save_interval_iters
=
args
.
save_interval_iters
,
save_interval_iters
=
args
.
save_interval_iters
,
log_iters
=
args
.
log_iters
,
log_iters
=
args
.
log_iters
,
...
...
dygraph/benchmark/hrnet.py
浏览文件 @
5d0a6b72
...
@@ -19,7 +19,8 @@ from paddle.fluid.dygraph.parallel import ParallelEnv
...
@@ -19,7 +19,8 @@ from paddle.fluid.dygraph.parallel import ParallelEnv
from
dygraph.datasets
import
DATASETS
from
dygraph.datasets
import
DATASETS
import
dygraph.transforms
as
T
import
dygraph.transforms
as
T
from
dygraph.models
import
MODELS
#from dygraph.models import MODELS
from
dygraph.cvlibs
import
manager
from
dygraph.utils
import
get_environ_info
from
dygraph.utils
import
get_environ_info
from
dygraph.utils
import
logger
from
dygraph.utils
import
logger
from
dygraph.core
import
train
from
dygraph.core
import
train
...
@@ -33,7 +34,7 @@ def parse_args():
...
@@ -33,7 +34,7 @@ def parse_args():
'--model_name'
,
'--model_name'
,
dest
=
'model_name'
,
dest
=
'model_name'
,
help
=
'Model type for training, which is one of {}'
.
format
(
help
=
'Model type for training, which is one of {}'
.
format
(
str
(
list
(
MODELS
.
keys
()))),
str
(
list
(
manager
.
MODELS
.
components_dict
.
keys
()))),
type
=
str
,
type
=
str
,
default
=
'UNet'
)
default
=
'UNet'
)
...
@@ -166,11 +167,9 @@ def main(args):
...
@@ -166,11 +167,9 @@ def main(args):
transforms
=
eval_transforms
,
transforms
=
eval_transforms
,
mode
=
'val'
)
mode
=
'val'
)
if
args
.
model_name
not
in
MODELS
:
model
=
manager
.
MODELS
[
args
.
model_name
](
raise
Exception
(
num_classes
=
train_dataset
.
num_classes
,
'`--model_name` is invalid. it should be one of {}'
.
format
(
pretrained_model
=
args
.
pretrained_model
)
str
(
list
(
MODELS
.
keys
()))))
model
=
MODELS
[
args
.
model_name
](
num_classes
=
train_dataset
.
num_classes
)
# Creat optimizer
# Creat optimizer
# todo, may less one than len(loader)
# todo, may less one than len(loader)
...
@@ -193,7 +192,6 @@ def main(args):
...
@@ -193,7 +192,6 @@ def main(args):
save_dir
=
args
.
save_dir
,
save_dir
=
args
.
save_dir
,
iters
=
args
.
iters
,
iters
=
args
.
iters
,
batch_size
=
args
.
batch_size
,
batch_size
=
args
.
batch_size
,
pretrained_model
=
args
.
pretrained_model
,
resume_model
=
args
.
resume_model
,
resume_model
=
args
.
resume_model
,
save_interval_iters
=
args
.
save_interval_iters
,
save_interval_iters
=
args
.
save_interval_iters
,
log_iters
=
args
.
log_iters
,
log_iters
=
args
.
log_iters
,
...
...
dygraph/models/__init__.py
浏览文件 @
5d0a6b72
...
@@ -14,38 +14,5 @@
...
@@ -14,38 +14,5 @@
from
.architectures
import
*
from
.architectures
import
*
from
.unet
import
UNet
from
.unet
import
UNet
from
.hrnet
import
*
from
.deeplab
import
*
from
.deeplab
import
*
from
.fcn
import
*
from
.fcn
import
*
# MODELS = {
# "UNet": UNet,
# "HRNet_W18_Small_V1": HRNet_W18_Small_V1,
# "HRNet_W18_Small_V2": HRNet_W18_Small_V2,
# "HRNet_W18": HRNet_W18,
# "HRNet_W30": HRNet_W30,
# "HRNet_W32": HRNet_W32,
# "HRNet_W40": HRNet_W40,
# "HRNet_W44": HRNet_W44,
# "HRNet_W48": HRNet_W48,
# "HRNet_W60": HRNet_W48,
# "HRNet_W64": HRNet_W64,
# "SE_HRNet_W18_Small_V1": SE_HRNet_W18_Small_V1,
# "SE_HRNet_W18_Small_V2": SE_HRNet_W18_Small_V2,
# "SE_HRNet_W18": SE_HRNet_W18,
# "SE_HRNet_W30": SE_HRNet_W30,
# "SE_HRNet_W32": SE_HRNet_W30,
# "SE_HRNet_W40": SE_HRNet_W40,
# "SE_HRNet_W44": SE_HRNet_W44,
# "SE_HRNet_W48": SE_HRNet_W48,
# "SE_HRNet_W60": SE_HRNet_W60,
# "SE_HRNet_W64": SE_HRNet_W64,
# "DeepLabV3P": DeepLabV3P,
# "deeplabv3p_resnet101_vd": deeplabv3p_resnet101_vd,
# "deeplabv3p_resnet101_vd_os8": deeplabv3p_resnet101_vd_os8,
# "deeplabv3p_resnet50_vd": deeplabv3p_resnet50_vd,
# "deeplabv3p_resnet50_vd_os8": deeplabv3p_resnet50_vd_os8,
# "deeplabv3p_xception65_deeplab": deeplabv3p_xception65_deeplab,
# "deeplabv3p_mobilenetv3_large": deeplabv3p_mobilenetv3_large,
# "deeplabv3p_mobilenetv3_small": deeplabv3p_mobilenetv3_small
# }
dygraph/train.py
浏览文件 @
5d0a6b72
...
@@ -19,7 +19,6 @@ from paddle.fluid.dygraph.parallel import ParallelEnv
...
@@ -19,7 +19,6 @@ from paddle.fluid.dygraph.parallel import ParallelEnv
from
dygraph.datasets
import
DATASETS
from
dygraph.datasets
import
DATASETS
import
dygraph.transforms
as
T
import
dygraph.transforms
as
T
#from dygraph.models import MODELS
from
dygraph.cvlibs
import
manager
from
dygraph.cvlibs
import
manager
from
dygraph.utils
import
get_environ_info
from
dygraph.utils
import
get_environ_info
from
dygraph.utils
import
logger
from
dygraph.utils
import
logger
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录